Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Wed Jun 01, 2005 5:30 pm Reply with quote

Another found easy to read tuto.


Virtual hosts are a very useful tool if you want to host multiple sites with multiple domains.
They will make it appear that each site has its own server.
Virtual hosts can also allow you to have server-side subdomains.
Virtual hosts work with all modern browsers.
When you visit a site, your browser sends info about itself, including the URL you are visiting.
Apache then processes the information and sends the correct files for the requested domain.
To visiters there is no noticed delay and it seems that they are visiting a site with its own server.


You will need to edit your httpd.conf file to set up virtual hosts.
Open it up in your favorite text editor and go to the very bottom.
This is the third section of the httpd.conf file.
You will need to set up an entry for each domain.
This includes the main site on the server.

The first entry should be for the main site of the server.
Here is an example:

Code:


<+VirtualHost *:80>
ServerAdmin Only registered users can see links on this board! Get registered or login!
DocumentRoot /www/domain.ext
ServerName 127.0.0.1
<+/VirtualHost>


Note: REMOVE THE '+' FROM BOTH VIRTUAL HOST TAGS
The first one will follow settings from the httpd.conf file.
For this to work correctly the DNS records for each domain must point to the IP address of your server.
Here is what the rest should look like below it:

Code:


<+VirtualHost *:80>
ServerAdmin Only registered users can see links on this board! Get registered or login!
DocumentRoot /www/otherdomain.ext
ServerName otherdomain.ext
DirectoryIndex index.php index.html index.htm
<+/VirtualHost>



As before, remove the '+' from the tags.
That's the format that should be used for the rest of the domains.
Most of the conifig directives are allowed to be used in a virtual host entry.


(again,these are simple howto's.....but posted because its easy to read and understand)
 
View user's profile Send private message
sting
Involved
Involved


Joined: Sep 23, 2003
Posts: 456
Location: Somewhere out there...

PostPosted: Sun Jun 05, 2005 7:02 pm Reply with quote

This is great - thanks

-sting
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©