Sign in to follow this  
Followers 0
twirlz

How to run multiple websites on one box

6 posts in this topic

So I want to run more than one website from a box at home. I have looked into apache for windows using the virtual hosts option, but i don't think that is what i'm looking for. From what i read about apache using virtual hosts that can only be used internally, am i correct in saying that? If i can use apache for windows with virtual hosts how would me entering a URL going to my box at home know which folder it's suppose to look to for the website that i want? If i can't use apache for windows with virtual hosts, can i run multiple instances of apache for windows to get the result i'm looking for? and if that is not possible is there another web server that i could run to get the desired effect?

Thanks

0

Share this post


Link to post
Share on other sites

IIS .. you poor guy :P

use apache and use the VirtualHost directive

<VirtualHost *:80>
DocumentRoot /usr/local/www/apache22/data
ServerName rmccurdy.com
</VirtualHost>



<VirtualHost *:80>
DocumentRoot /usr/local/www/apache22/data/camaro/docs
ServerName bitchincamaro.no-ip.com
</VirtualHost>

0

Share this post


Link to post
Share on other sites
IIS .. you poor guy :P

use apache and use the VirtualHost directive

<VirtualHost *:80>
DocumentRoot /usr/local/www/apache22/data
ServerName rmccurdy.com
</VirtualHost>



<VirtualHost *:80>
DocumentRoot /usr/local/www/apache22/data/camaro/docs
ServerName bitchincamaro.no-ip.com
</VirtualHost>

So apache will read the URL entered and route it to the folder for said website?

also i see that your using linux, this will work in windows as well?

0

Share this post


Link to post
Share on other sites

yep since apache is not much different in Windows then Unix really

0

Share this post


Link to post
Share on other sites

As long as each host is pointing to the IP of your system, virtual hosts will work... they are defined in the HTTP 1.1 standards.

Example:

Client connects to 56.57.77.88(*.domain.com):

GET /index.html HTTP/1.1
Host: subdomain.domain.com

The server parsers the header information, finds the Virtual Host mapping, and responds:

HTTP/1.1 200 OK
Date: Tue, 12 Aug 2008 03:03:30 GMT
Server: Apache
Last-Modified: Wed, 12 Mar 2008 16:28:31 GMT
ETag: "949f8367d3b7ff027cb743fb7ff017b7ff0949f8"
Accept-Ranges: bytes
Content-Length: 2216
Content-Type: text/html

(Followed by content you requested...)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0