Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Help with using Apache to host 3 sites off of one server
Google
Post new topic Reply to topic
Author Message
QWERTYtech
 
 


Joined: 03 May 2006
Posts: 47

PostPosted: Mon Dec 25, 2006 4:17 am Reply with quoteBack to top

I am wanting to host 3 sites off of my local server and I was wondering if someone could help me setup my apache to communicate to all three sites. I would greatly appreciate any help with this.

*** UPDATE ***

These are my three sites.
qwertytech.bounceme.net
redbeardcustoms.no-ip.info
sinistergrin.no-ip.info


Can someone please help me with my Virtual Host setup. I would greatly appreciate it.
View user's profileSend private messageAIM Address
lku homer
 
 


Joined: 29 May 2006
Posts: 104

PostPosted: Mon Jan 01, 2007 11:51 pm Reply with quoteBack to top

There are many topics about this, but I shall help you none the less:

In your httpd.conf this is what you want for your VirtualHosts
Code:


#
# Use name-based virtual hosting.
#
NameVirtualHost *:80


<VirtualHost localhost:80>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot C:/apache2triad/htdocs
ErrorLog logs/error.log
CustomLog logs/access.log common

#display php errors
php_value register_globals 0
php_value error_reporting 2047
php_value display_errors 1
</VirtualHost>

<VirtualHost *:80>
ServerName www.domain1.com
ServerAlias domain1.com
ServerAdmin webmaster@domain1.com
DocumentRoot C:/apache2triad/htdocs/www/domain1
ErrorLog logs/domain1.com-error.log
CustomLog logs/domain1.com-access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName www.domain2.com
ServerAlias domain2.com
ServerAdmin webmaster@domain2.com
DocumentRoot C:/apache2triad/htdocs/www/domain2
ErrorLog logs/domain2-error.log
CustomLog logs/domain2-access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName www.domain3.com
ServerAlias domain3.com
ServerAdmin webmaster@domain3.com
DocumentRoot C:/apache2triad/htdocs/www/domain3
ErrorLog logs/domain3-error.log
CustomLog logs/domain3-access.log common
</VirtualHost>


Using, DirectoryIndex index.html, gave me either a file not found, or if I went to a sub-folder inside the domain it would give me just the folder structure, so I don't use that.

Also make sure you have your C:\WINDOWS\system32\drivers\ect\host file have the three domains listed. Different routers give you different gateways, so you may have to change this:
Code:

192.168.1.1 <tab> localhost
192.168.1.1 <tab> www.domain1.com
192.168.1.1 <tab> www.domain2.com
192.168.1.1 <tab> www.domain3.com

That is assuming you have Windows of course, I don't know about Unix.

I believe that should get you going, assuming that you already have the domains pointed to your computers external IP, and router(if applicable) ports opened up.

If there are more problems post here, if not, let me know if it worked ok.

Homer
View user's profileSend private messageAIM AddressYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



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 cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT