Access apache virtual hosts from lan
Hi,
My virtual hosts work fine but I cannot access them via the web from my lan. I can use the serveralias apache directive to access one host. All i have to do is type MYALIAS in my browser and it goes to the right place. My question is can I add multiple aliases to the hosts file to access multiple virtual hosts? Can I add more aliases to the same loopback address?
Hosts File
127.0.0.1 MYALIAS localhost.localdomain localhost
add?
127.0.0.1 ANOTHERALIAS localhost.localdomain localhost
# host1 (i can access this default server by IP address)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName stuff.mydomain.com
</VirtualHost>
# Host2 (can't access internally, but ok on www)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName morestuff.mydomain.com
ServerAlias MYALIAS
</VirtualHost>
# Host2 (I can access this by alias)
<VirtualHost>
DocumentRoot /www/mydir1
ServerName morestuff.mydomain.com
ServerAlias MYALIAS
</VirtualHost>
thanks
|