How do you do....it? Thread, Virtual Apache Servers in Technical; Hi all,
I am using Apache2Triad on a Windows server. I would like to have another separate website on the ...
30th May 2008, 07:39 PM #1
Virtual Apache Servers
I am using Apache2Triad on a Windows server. I would like to have another separate website on the same server. I can achieve this by setting up virtual Apache Servers, but how do I do this please?
30th May 2008, 07:46 PM #2
Add a virtualhost to your httpd.conf like this:
(change paths for windoze)
CustomLog /var/www/vhosts/server1l/logs/access_log combined
30th May 2008, 07:48 PM #3
Where about in the config file will that live? also will I have to put quotation marks around the paths?
30th May 2008, 07:55 PM #4
There should be a virtualhost section in your configuration file, if not you can probably append it to the end.
We actually have a include in our httpd.conf file and our virtualhost configurations live in a separate directory - this is quite common on nix servers.
I don't have any quotations on my machines, not sure about windows.
30th May 2008, 08:12 PM #5
I do this on Windows.
Your VirtualHost directives can go anywhere, but always after the NameVirtualHost:
This tells Apache you want to use name-based hosting on that IP, or in this case all of them, and port 80.
Then your VirtualHost directives must match this declaration (i.e. you can't declare a wildcard NameVirtualHost but then single IP VirtualHosts - they must all be wildcard. You can declare NameVirtualHost multiple times for different IPs or ports).
Practically any directive can go in a virtual host container. The first host to match the servername or serveralias directives gets the request. If none match, the request is served by the first host you declared, so watch out for that.
If you have defined your ServerRoot properly, you can use relative paths for the DocumentRoot and other directives, just as you would declare them normally.
30th May 2008, 08:15 PM #6
Ok i think i get that, i will give you a shout if a get stuck
30th May 2008, 08:18 PM #7
By Steven in forum Wireless Networks
Last Post: 25th May 2008, 11:27 PM
By flashsnaps in forum Thin Client and Virtual Machines
Last Post: 12th February 2008, 06:14 PM
By russdev in forum Web Development
Last Post: 11th May 2007, 09:46 AM
Last Post: 7th March 2006, 03:12 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)