Jump to content


Photo

Apache Virtual Host


  • Please log in to reply
2 replies to this topic

#1 calvinmcdaniel

calvinmcdaniel
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 25 February 2006 - 03:35 AM

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\cmcwebsite
servername www.cmcdaniel.com
</virtualhost>

<virtualhost *:8000>
documentroot c:\apache2\htdocs\awesomeframes
servername www.awesomeframes.com
</virtualhost>

Where am I messing up, please.

Thanks
Calvin McDaniel

#2 david23

david23
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 08 March 2006 - 05:11 PM

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]

#3 dbrimlow

dbrimlow
  • Members
  • PipPipPip
  • Advanced Member
  • 712 posts

Posted 27 March 2006 - 04:56 PM

You want to use "name based hosts" as follows:


<virtualhost www.cmcdaniel.com>
documentroot c:\apache2\htdocs\cmcwebsite
servername www.cmcdaniel.com
</virtualhost>

<virtualhost www.awesomeframes.com>
documentroot c:\apache2\htdocs\awesomeframes
servername 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.


Dave

I am always amazed by no matter how much I know, I know I don't know as much as I thought I knew.  - D. Brimlow.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users