Manually changing apache virtual host IP to *:80 prevents htaccess from working properly?

Symptoms of the issue: I have a WordPress installation but if I change my apache VirtualHost IP from {x.x.x.x}:80 to *:80 only the homepage works and all the other pages (pretty permalinks) stop working.

Background of my goal: I’m want to use *:80 because I want to make Apache listen on both the public and private IP in digital ocean VPS. I’m looking to setup load balancing over private IPs.

Hi,

You need to make sure that your VirtualHost actually have set the following directive (for a directory):

AllowOverride All

if I change my apache VirtualHost IP from {x.x.x.x}:80 to *:80 only the homepage works

You need to make sure that all VirtualHosts are using *:80, otherwise it will fall back to the first one with an IP address defined.

That may have security implications. Probably better to specify which overrides are allowed and just make sure to include all the ones you want domain owners to be able to change. But, even better, get the base configuration (in Server Templates) right for most of your users so you only use .htaccess for domain-specific stuff that the domain owner should be able to change.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.