0
When I type
cat /etc/apache2/sites-enabled/*
I see
<VirtualHost *:80>
ServerName myserver
DocumentRoot /var/www/
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain1.net
DocumentRoot /var/www/www.mydomain1.net/public/
</VirtualHost>
<VirtualHost *:80>
ServerName mydomain1.net
RedirectMatch permanent ^/(.*) http://www.mydomain1.net/$1
</VirtualHost>
<VirtualHost *:80>
ServerName www.yasser.com
DocumentRoot /var/www/www.mydomain2.com/public/
</VirtualHost>
<VirtualHost *:80>
ServerName mydomain2.com
RedirectMatch permanent ^/(.*) http://www.mydomain2.com/$1
</VirtualHost>
When I browse mydomain1.com and mydomain2.com, I see the contents from "myserver" which is list of directories in /var/www
.
What am I doing wrong here?
Also here is the output of apachectl -S
:
*:80 is a NameVirtualHost
default server myserver (/etc/apache2/sites-enabled/myserver:1)
port 80 namevhost myserver (/etc/apache2/sites-enabled/myserver:1)
port 80 namevhost www.mydomain1.net (/etc/apache2/sites-enabled/www.mydomain1.net:1)
port 80 namevhost mydomain1.net (/etc/apache2/sites-enabled/www.mydomain1.net:6)
port 80 namevhost www.mydomain2.com (/etc/apache2/sites-enabled/www.mydomain2.com:1)
port 80 namevhost mydomain2.com (/etc/apache2/sites-enabled/www.mydomain2.com:6)
Put your myserver at the end of the list. – kobaltz – 2012-04-19T23:55:00.733