Multiple VirtualHosts
Posted by: Oliver Reynolds (---.radnet-kendal.kencomp.net)
Date: December 17, 2005 04:26PM

I cant get the multiple virtualhosts to work but i dunno why ive searched the apache website and done wat it says there but it still dont work.

Here is what im trying to do, I want my main domain (olsrey.co.uk) and a subdomain (tomi3s.olsrey.co.uk (this goes to a folder under my main domain)) but however i set it up tomi3s.olsrey.co.uk still goes to my main domain.

If anyone can help me out I'd be very gratefull as i have spent hours last night trying to do this and just failed.

Oliver

Options: ReplyQuote
Re: Multiple VirtualHosts
Posted by: Romain Bourdon (---.fbx.proxad.net)
Date: December 18, 2005 11:05AM

Try using name based virtualhosts :

[httpd.apache.org]

Romain

Options: ReplyQuote
Re: Multiple VirtualHosts
Posted by: Oliver Reynolds (---.radnet-kendal.kencomp.net)
Date: December 18, 2005 09:40PM

This is what i used but when ever i tried to goto tomi3s.olsrey.co.uk it still goes to olsrey.co.uk.

Im gonna post my virtual host setting here so you can tell me if it is wrong

NameVirtualHost 217.17.53.140

<VirtualHost 217.17.53.140>
ServerName [olsrey.co.uk]
DocumentRoot /www/
</VirtualHost>

<VirtualHost 217.17.53.140>
ServerName [tomi3s.olsrey.co.uk]
DocumentRoot /www/tom_pics/
</VirtualHost>


Options: ReplyQuote
Re: Multiple VirtualHosts
Posted by: George (---.pwayne01.pa.comcast.net)
Date: December 18, 2005 09:42PM

Maybe the following instrcution will also work for you

Step 1:
Edit the file located in C:\windows\system32\drivers\etc\hosts

add the following to it
127.0.0.1 olsrey.co.uk
127.0.0.1 tomi3s.olsrey.co.uk

Save File


Step 2:
Edit the httpd.conf file

Add the following to the bottom of the file

##########################
NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www"
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\olsrey.co.uk"
ServerName tomi3s.olsrey.co.uk
ErrorLog logs/tomi3s_error.log
</VirtualHost>
###########################

Step 3:
You must make sure the subdomain directory exists. If not create one.
Restart Apache server

Options: ReplyQuote
Re: Multiple VirtualHosts
Posted by: Oliver Reynolds (---.radnet-kendal.kencomp.net)
Date: December 18, 2005 09:54PM

Hi, thanks for the reply but tomi3s.olsrey.co.uk still goes to olsrey.co.uk

Options: ReplyQuote
Re: Multiple VirtualHosts
Posted by: Langis Gagnon (---.ic.gc.ca)
Date: December 21, 2005 06:19PM

I use multiple virtualhosts all the time. I think your problem might be related to the following line:
ServerName [tomi3s.olsrey.co.uk]

should say
ServerName tomi3s.olsrey.co.uk

Also, unless you have more than one IP address on your PC, I sugest the follwoing:

NameVirtualHost *
<VirtualHost *>

Using the * instead of the ip ensures that if you ever change your IP address your virtual hosts will still work.

This will work just as long as the DNS points to your IP when the olsrey.co.uk is typed in the web browser.

Hope this helps.

Options: ReplyQuote
wampserver
Posted by: pramilamandlik (203.129.237.---)
Date: February 24, 2010 06:09AM

the procedure entry point php_set_error_handling could not be located in the dynamic linklibrary php5ts.dll how to find this error? Give me the solution

Options: ReplyQuote


Sorry, only registered users may post in this forum.