|
|
 |
Author |
Message |
smithster

Joined: 06 Jan 2007
Posts: 4
|
Posted:
Sat Jan 06, 2007 11:19 pm |
  |
I have tried and tried using the given tutorials and I just cannot set up the virtual hosts. Perhaps someone can tell me where I am going wrong!
Here's the code I used.....
Quote: |
NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 87.81.28.214:8000>
ServerAdmin webmaster@87.81.28.214:8000
DocumentRoot g:/web1
ServerName 87.81.28.214:8000
ErrorLog /www/apache2triad/logs/localhost-error_log
CustomLog /www/apache2triad/logs/localhost-access_log common
</VirtualHost>
#
<VirtualHost 87.81.28.214:8080>
ServerAdmin webmaster@87.81.28.214:8080
DocumentRoot g:/web2
ServerName 87.81.28.214:8080
ErrorLog /www/apache2triad/logs/arena-error_log
CustomLog /www/apache2triad/logs/arena-access_log common
</VirtualHost>
|
Thanks in advance.  |
|
|
  |
 |
lku homer

Joined: 29 May 2006
Posts: 104
|
Posted:
Sat Jan 06, 2007 11:46 pm |
  |
Make sure you make the listen ports 8000 and 8080. And why do you have 2 VirtualHosts for the same IP? I also find it best to set up the localhost VirtualHost. If you changed the code for this example we can't help you because by having the IP's the same, we think that is your problem.
Also, make the log files:
Code: |
logs/localhost-error_log
logs/localhost-acces_log common
|
|
|
|
      |
 |
smithster

Joined: 06 Jan 2007
Posts: 4
|
Posted:
Sun Jan 07, 2007 12:15 am |
  |
Well, believe me there is a method in the madness!!!
Anyway, I figured it out, and I now have 5 websites running!! For the benefit of others, here is the coding for the 5 sites......
Quote: |
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:5000
<VirtualHost *:5000>
DocumentRoot g:/web1
ServerName 87.81.28.214:5000
ErrorLog /www/apache2triad/logs/web1-error_log
CustomLog /www/apache2triad/logs/web1-access_log common
</VirtualHost>
NameVirtualHost *:6000
<VirtualHost *:6000>
DocumentRoot g:/web2
ServerName 87.81.28.214:6000
ErrorLog /www/apache2triad/logs/web2-error_log
CustomLog /www/apache2triad/logs/web2-access_log common
</VirtualHost>
NameVirtualHost *:7000
<VirtualHost *:7000>
DocumentRoot g:/web3
ServerName 87.81.28.214:7000
ErrorLog /www/apache2triad/logs/web3-error_log
CustomLog /www/apache2triad/logs/web3-access_log common
</VirtualHost>
NameVirtualHost *:8000
<VirtualHost *:8000>
DocumentRoot g:/web4
ServerName 87.81.28.214:8000
ErrorLog /www/apache2triad/logs/web4-error_log
CustomLog /www/apache2triad/logs/web4-access_log common
</VirtualHost>
NameVirtualHost *:9000
<VirtualHost *:9000>
DocumentRoot g:/web5
ServerName 87.81.28.214:9000
ErrorLog /www/apache2triad/logs/web5-error_log
CustomLog /www/apache2triad/logs/web5-access_log common
</VirtualHost>
|
I hope that this helps other people out. Good luck!!  |
|
|
  |
 |
lku homer

Joined: 29 May 2006
Posts: 104
|
Posted:
Sun Jan 07, 2007 12:21 am |
  |
|
      |
 |
|
|
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
|