Virtual hosts without having a domain
Can I create virtual hosts on my linode without having a domain?
2 Replies
Sure… I have a bunch of sites set up on a local-LAN box with virtual hosts:
<VirtualHost _default_:80>
# Server name
#
ServerName foo.com.local
ServerAlias www.foo.com.local
...blah, blah, blah...
</VirtualHost>
The rub is that on the box where you run the browser, you have to have a bunch of entries like this in /etc/hosts:
#
<IP address> foo.com.local
The /etc/hosts entries have to be replicated to every box running a browser that wants/needs to access the site(!!!!). Not very convenient but doable…
Unless you're some kind of control freak or have a fetish about unauthorized access, just get a domain name. You're life will be so much easier. This is why God invented DNS…
-- sw