Virtual Host
Posted by: nicktuckwell (194.62.232.---)
Date: September 21, 2006 05:43PM

Hi All,

I wonder if anyone can help me, as I'm at my wits end!

I'm trying to configure Name-based Virtual Hosting on Apache and have drawn a blank. I really need a working example of httpd.conf to copy the settings from, if that's at all possible. I have been able to get my URLs to point to my public IP address, and then for that IP address to relate to Apache, displaying the 'WAMP' page. No problem there. What I am unable to do is set the two URLs to point to different folders, thereby serving two different websites from the same machine.

Any help greatly appreciated,

Yours in desperation,

Nick.

Re: Virtual Host
Posted by: nicktuckwell (194.62.232.---)
Date: September 22, 2006 01:46PM

I should probably point out that I have read through the previous posts on this, but with no joy. For reference, I have attached the interesting parts of my httpd.conf below:

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#
Listen 80

# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName 82.32.xxx.xxx:80

# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all

NameVirtualHost *:80

#

<VirtualHost www.example1.co.uk:80>
ServerName www.example1.co.uk
DocumentRoot /www/example1folder
</VirtualHost>

<VirtualHost *:80>
ServerName www.example2.co.uk
DocumentRoot /www/example2folder
</VirtualHost>

Hope this clarifies things a bit...

Thanks,

Nick.

Sorry, only registered users may post in this forum.