Hi,
I have some problem in apache2 configuration.
I have two websites on same IP on LAN.i.e. 192.168.1.5
site1.abc.com
and abc.com
both have different document roots
for abc.com document root
/var/www/abc
and for site1.abc.com document root
/var/www/site1
the above sites are on a server which is accessible to me only via SSH.
Now on Lan if I do
http://192.168.1.5
I get abc.com
and if I do
http://192.168.1.5/abc
or
http://192.168.1.5/site1
then in both cases I am getting abc.com which is alphabetically first vhost (that is also how apache2 serves)
What should I do to be able to access both the websites
following are vhosts in sites-enabled
for abc
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/abc
<Directory /var/www/abc >
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
~
and for site1.abc.com a separate file in /etc/apache2/sites-enabled
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName site1.abc.com
ServerAlias site1.abc.com
DocumentRoot /var/www/site1
<Directory /var/www/site1 >
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
~
What should I check in a few blogs I checked they said to mention in /etc/apache2/apache2.conf
ServerName.
But in this case what should I put I have two different websites or what other thing I have missed?
I am using Debian Lenny and apache2