How does apache2 virtual hosting work?
I've set up apache2 to work with a single webpage by placing it in /var/www, and I've read a few tutorials on creating a couple of websites.
Neither has explained how to set up the records, or how apache2 knows which site to display?
Ok say I have a computer named Server1, and I want to host websites www.ABC.com and www.XYZ.com.
How would I set up the records so apache2 knows which page to display? The last time I set up a record I just told it the name they'd type in, and the IP/port to associate with it, so if I have two records going to the same IP, what does apache use to intuit which page to display?
I'm sure I'm missing something stupid simple here :P
I'm assuming you have one IP address for the 2 domain names. Have you had a look at the docs at http://httpd.apache.org/docs/2.0/vhosts/name-based.html and http://httpd.apache.org/docs/2.0/vhosts/examples.html yet? The other thing to confirm is that your domain names are resolvable by DNS, but that's outside of the Apache configuration.
|All times are GMT -5. The time now is 04:22 AM.|