ittechlab
asked on
Name-Based Virtual hosts
I am running wordpress and joomla here.
site1 contain joomla and site2 contains wordpress setup.
When i have this setup the sites are not working properly. If i just keep site1 and comment out site2 and site3 it works fine. as soon i uncomment site2 or site3 , site1 is having issue. they all are in diff directories. Please advise.
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/site1
ServerName www.site1.ca
</VirtualHost>
#<VirtualHost *:80>
# DocumentRoot /var/www/site2
# ServerName www.site2.ca
#</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/site3
ServerName www.site3.net
</VirtualHost>
site1 contain joomla and site2 contains wordpress setup.
When i have this setup the sites are not working properly. If i just keep site1 and comment out site2 and site3 it works fine. as soon i uncomment site2 or site3 , site1 is having issue. they all are in diff directories. Please advise.
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/site1
ServerName www.site1.ca
</VirtualHost>
#<VirtualHost *:80>
# DocumentRoot /var/www/site2
# ServerName www.site2.ca
#</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/site3
ServerName www.site3.net
</VirtualHost>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Anyway first tweak, add a ServerAlias entry to each virtual host, to see if your loosing the www. e.g.
ServerAlias site1.ca *.site1.ca
If still broke compare the hostname configured for your Joomla site, with the virtual host name, and possibly try something a bit more generic e.g. http://docs.joomla.org/VirtualHost_with_Joomla