Forum archive
Domain based Virtual Hosts?
We have a Apache/Wordpress DB Turnkey Server wite a site surrently set up on it with no domain attached to it so all port 80 traffic goes to that Wordpress install. I would like to set up another site that uses a totally different domain name on that same server. I can set up the wordpress databases/directories no problem. How do I go about getting Domain A to point to one directory and Domain B to point to another both on port 80.
For explanation purposes:
Domain A - abcxyz.com
Domain B - 12345.com
Thank you for any an all help!
Trevor
From my reading of the Apache docs what you have should work. Note that the docs refer to httpd.conf, but as I hinted earlier Debian (and derivatives such as TurnKey) do things differently and have individual conf files, rather than one big monolithic httpd.conf.
What I was (mistakenly) suggesting was to swap the wildcard (*) in the VirtualHost directive (i.e. the "<VirtualHost *.80>") for the server name. That is incorrect as you replace the wildcard for an IP (if you are using IP based virtual hosts). So bottom line is I think that should work... Does it?
FWIW there are some example Apache conf here.