Error : HTTP/1.1 301 Moved Permanently


When i’m binding haproxy to port 80 and access the context root etc it all works fine
example :

Apache backend server is listening on port 80

But when i bind haproxy to port 443 and have a pem file attached to it so that the traffic is encrypted between user browser and haproxy
At the backend i,e haproxy to backend servers apache it should be plain text

When i try to access I keep getting 301 Moved permanently error

Could some one please help me out. Thanks

Error : Given Below
apache1 ~]# curl -vvv -k -H ‘Cache-Control: no-cache’

  • Trying…
  • Connected to ( port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (IN), TLS handshake, Server key exchange (12):
  • TLSv1.2 (IN), TLS handshake, Server finished (14):
  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  • TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.2 (OUT), TLS handshake, Finished (20):
  • TLSv1.2 (IN), TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  • ALPN, server did not agree to a protocol
  • Server certificate:
  • SSL certificate verify result: self signed certificate (18), continuing anyway.

GET /primary HTTP/1.1
User-Agent: curl/7.61.1
Accept: /
Cache-Control: no-cache

< HTTP/1.1 301 Moved Permanently
< Server: Apache/2.4.37 (centos) OpenSSL/1.1.1c
< Location:
< Content-Length: 239
< Content-Type: text/html; charset=iso-8859-1

301 Moved Permanently

Moved Permanently

The document has moved here.

* Connection #0 to host left intact

Hi All,

Kindly ignore this. I have found the problem it was with Apache.

Many Thanks