Apache 2.2.22 - Random Vhost misrouting

I have a Apache 2.2.22 + PHP 5.4.9 running on a Ubuntu 12.04 I’m hosting three sites here. For that, i have 2 virtual host pointing to three differents folders. For example, this is one Vhost for domain1 Code: <VirtualHost *:80> ServerName ServerAlias ServerAdmin DocumentRoot /mnt/htdocs/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /mnt/htdocs/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory “/usr/lib/cgi-bin”> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/ CustomLog ${APACHE_LOG_DIR}/ combined </VirtualHost> The this here is that the 1% of the hits goes to incorrect folder. the other 99% goes to the correct folder and resolve the correct domain/code. Example of the error in’s error log Code:

[Fri Feb 14 15:21:45 2014] [error] [client] PHP Fatal error: Class ‘Sitemap\SitemapServiceProvider’ not found in /mnt/htdocs/ on line 123, referer:

This service provider doesn’t exists because is routed to’s folder. This error is COMPLETELY RANDOM. If I reload the error page, the site render ok. I checked all the lines of vhosts, erasing all the non critical to keep it simple but the error continues. Any thought?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Woops, the code was bad, here the paste bin with VirtualHost and error log line <br> <br>