calvinmcdaniel Posted February 25, 2006 Share Posted February 25, 2006 I need some help. I am running Apache server and would like to run 2 website from same IP. I've read the docs on how to set up the virtual hosts, but still can't get it. I'm confused about the main server area at the top of httpd file for document root and directory. Are those to be left blank in order to pick up the virtual host information.My sites come in on port 8000.I've added this without luck.namevirtualhose *:8000<virtualhost *:8000>documentroot c:\apache2\htdocs\cmcwebsiteservername www.cmcdaniel.com</virtualhost><virtualhost *:8000>documentroot c:\apache2\htdocs\awesomeframesservername www.awesomeframes.com</virtualhost>Where am I messing up, please.ThanksCalvin McDaniel Quote Link to comment https://forums.phpfreaks.com/topic/3581-apache-virtual-host/ Share on other sites More sharing options...
david23 Posted March 8, 2006 Share Posted March 8, 2006 try to check this place for how to use virtual hosts in apache[a href=\"http://www.debianhelp.co.uk/virtualhosts.htm\" target=\"_blank\"]Name and IP based Virtual hosts configuration[/a] Quote Link to comment https://forums.phpfreaks.com/topic/3581-apache-virtual-host/#findComment-15441 Share on other sites More sharing options...
dbrimlow Posted March 27, 2006 Share Posted March 27, 2006 You want to use "name based hosts" as follows:<virtualhost www.cmcdaniel.com>documentroot c:\apache2\htdocs\cmcwebsiteservername www.cmcdaniel.com</virtualhost><virtualhost www.awesomeframes.com>documentroot c:\apache2\htdocs\awesomeframesservername www.awesomeframes.com</virtualhost>It is tricky on local binary systems (self installed AMP or phptriad or WAMP).But it should work. You may have to turn on the name based Vhost mod.This is assuming that the 2 sites are folders with full websites contained within. If you have one website set up in htdocs, and a folder for the other it will not work. Quote Link to comment https://forums.phpfreaks.com/topic/3581-apache-virtual-host/#findComment-21253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.