Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Snapey's avatar
Level 122

Apache2 always redirects to port 443

I have a server hosting a site as a virtual host. I have Letsencrypt on the server to provide the SSL certificate and this all works fine.

I'm struggling to add another virtual host. The server always does a 301 redirect to the same domain name on port 443 - but this is a test domain, I just want it to run on port 80.

Any suggestions where I can find this redirect setting?

0 likes
1 reply
Snapey's avatar
Snapey
OP
Best Answer
Level 122

Live and learn as they say...

On checking with network tools in my browser, when hitting the test site on port 80, the headers in the inspector said

301 Moved Permanently (from disk cache)

So, no matter what I was changing on the server, the browser had remembered a previous 301 and was happily just sending me there each time.

Checking the box 'Disable cache' cleared the problem and made everything behave as I expected!

Grrr

Please or to participate in this conversation.