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
 Yet another VirtualHost Problem
Google
Post new topic Reply to topic
Author Message
riakari
 
 


Joined: 31 May 2006
Posts: 1

PostPosted: Wed May 31, 2006 6:45 pm Reply with quoteBack to top

Hello,

I seem to be having a vhost problem. I have searched through the forums, and I have tried a lot of different "fixes", however, nothing has worked so far. So I wsa thinking that I needed a fresh eye on my conf file. I am missing something, and I have no idea what it is.

Here is the deal: on the machine that acts as the server, everything works perfectly. Each vhost goes exactly where it is supposed to go. However, from the outside world, everything goes into the primary vhost folder. Here is my httpd.conf file:

NameVirtualHost 192.168.1.100:80

#
# 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 *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error.log
# CustomLog logs/dummy-host.example.com-access.log common
#</VirtualHost>

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

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

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

I am behind a linksys wireless router with port forwarding on and my firewall allows a passthrough of port 80. Internally, website1 goes to website1 and website2 goes to website2. Externally, both website1 and website2 go to website1. Localhost goes to localhost just fine.

I appreciate your help. I have been wading through these forums for a few hours now, and still haven't figured it out.
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Thu Jun 01, 2006 12:36 am Reply with quoteBack to top

try a * wildcard instead of 192.168.1.100
View user's profileSend private messageYahoo MessengerICQ Number
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Sun Jun 04, 2006 11:22 am Reply with quoteBack to top

Code:

#here delete the :80
NameVirtualHost 192.168.1.100

#
# 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 *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error.log
# CustomLog logs/dummy-host.example.com-access.log common
#</VirtualHost>
[code]
DELETE THIS ONE
<VirtualHost *>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot "C:/apache2triad/htdocs"
ErrorLog logs/error.log
CustomLog logs/access.log common
</VirtualHost>
[/code]

#here just delete the port :80
<VirtualHost 192.168.1.100>
ServerName www.website1.com
ServerAdmin webmaster@website1.com
DocumentRoot C:/apache2triad/htdocs/www/website1
ErrorLog logs/website1.com-error.log
CustomLog logs/website1.com-access.log common
</VirtualHost>

#here just delete the port :80
<VirtualHost 192.168.1.100>
ServerName www.website2.com
ServerAdmin webmaster@website2.com
DocumentRoot C:/apache2triad/htdocs/www/website2
ErrorLog logs/website2.com-error.log
CustomLog logs/website2.com-access.log common
</VirtualHost>
View user's profileSend private messageSend e-mailYahoo Messenger
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