[Fixed] Multiple VirtualHosts? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: [Fixed] Multiple VirtualHosts? (/showthread.php?tid=67699) [Fixed] Multiple VirtualHosts? by hmaster on 10-26-2006 at 10:38 AM
I have a Apache server running on my desktop and I was wondering how I can get more than one virtual host, eg http://localhost/ is currently pointed to my main folder but I'd like another one, http://localhost2/ or w/e, to point to another folder for a specific site. code:And in the httpd.conf file it should be like this: code: RE: Multiple Localhosts? by Sypher on 10-26-2006 at 12:03 PM
First of all, for these things don't use "localhosts" but virtualhosts. code: If you want him to listen at all IP's you have. Then for the vhosts, add this: code:and for the second one code: You should adapt these things to your own settings, like the IP. If you want to create "localhost2" you can edit your hostsfile. In Windows XP this is located at c:\WINDOWS\system32\drivers\etc\hosts Normally it would look like this: code: Change it to code: Should work. Good luck! RE: Multiple VirtualHosts? by hmaster on 10-26-2006 at 01:24 PM
quote:Thanks. quote:It recognises that there is a second vhost but doesn't allow me to view files. RE: Multiple VirtualHosts? by Sypher on 10-31-2006 at 01:56 PM Try checking the logfiles then RE: Multiple VirtualHosts? by Adeptus on 10-31-2006 at 02:55 PM
You are probably missing a <Location> directive telling the server it is allowed to serve files under whatever the local path for the files is. |