we have a set up where main site (wordpress) is running on the server, all additional mini sites that should appear within the main one, but not served by wordpress are configured as Alias'es:

Alias "/toolbox/some-application-directory" "/var/www/some-application-directory/current/public"

<Directory /var/www/some-application-directory/current/public>
        AllowOverride All
        Options FollowSymLinks Multiviews
        Order allow,deny
        Allow from all
        Require all granted

This setup works (or worked) well for all applications, but the last one i have added started to behave weirdly, apache would randomly not resolve the that specific alias and display the main application (wordpress) 404. This happens randomly on requests. Restarting apache seems to temporarily fix the issue. but is strats happening again after few requests. Nothing in the log. Applications as PHP served via apache (not fpm). Any advice on where to start looking would be greatly appreciated.

  • I don't know if this is the reason for the strange behavior you describe, but Order allow,deny and Allow from all are deprecated as of ver. 2.4. I'd recommend to remove them, because with Require all granted you already have defined the same rule for ver. 2.4 – digijay Sep 24 '19 at 8:06
  • Hi digijay, thnx for you reply, no this was not the reason, but i figured it out. Turns out apache had some zombie processess, that would not terminate when restarting apache. These processess would still have the old vhost config loaded and so if the request would end up with one of the old ones it would produce the LB like behaviour. – Auris Sep 24 '19 at 9:30

Just in case someone else stumbles on to a similar problem, IN MY CASE it was the issue of some zombie apache processess that would not terminate when restarting apache. Those processess would still carry old vhost config and this is what was causing the issue.

How to test/solve this?

Crude solution and I guess someone may have a better one: Stop apache and check if there are still any apache processess left, if there are, terminate them manually and start apache again, all new workers will have propper config loaded.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.