Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old November 18th, 2004, 09:54 AM
thesun thesun is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 thesun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Apache virtual host weirdness

I had all this working fine prior to getting a Dlink router. I used to have an ipchains firewall, mod_security, and my machine connected directly to the internet. It served three websites using the "Virtual Hosts" option. Let's call them website1.com, website2.com and website3.com.

Now, even with the router port 80 open, I am getting a "Forbidden, you don't have permissions to access / on that server" error when I try to access any of the websites. What I figured out is that somehow it's directing me to the DocumentRoot directory (i.e. /usr/local/apache/html/) instead of one folder down, where the individual sites' index pages are. (i.e. /usr/local/apache/html/website1/, /usr/local/apache/html/website2/, etc.)

For example, if I type "www.website1.com" I get the 403 error, access forbidden. If I type "www.website1.com/website1/" however, I'm served the page I wanted. Furthermore, I can mix and match any of the domains and any of the folders...for example: "www.webside3.com/website1/" will give me website 1's home page, not website3's. "www.website1.com/website3/" will give me website 3's home page.

Anyone have a clue why this happened or what I can do to fix it? My Virtual Host lines are simple:

LISTEN 80
LISTEN 8082
LISTEN 8090

#NameVirtualHost *
NameVirtualHost mywebsite1.homelinux.net:80
NameVirtualHost www2.mywebsite2.org:8082
NameVirtualHost www2.mywebsite3.com:8090

#
# 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 mywebsite1.homelinux.net:80>
DocumentRoot /usr/local/apache/http/mywebsite1/
ServerName mywebsite1.homelinux.net
</VirtualHost>

<VirtualHost www2.mywebsite2.org:8082>
# ServerAdmin webmaster@www.mywebsite2.org
DocumentRoot /usr/local/apache/html/mywebsite2/
ServerName www2.mywebsite2.org
</VirtualHost>

<VirtualHost www2.mywebsite3.com:8090>
# ServerAdmin webmaster@www.mywebsite3.com
DocumentRoot /usr/local/apache/html/mywebsite3/
ServerName www2.mywebsite3.com
</VirtualHost>

Any and all help would be great. Thanks in advance!


URL

Reply With Quote
  #2  
Old December 27th, 2004, 03:23 PM
JHorton JHorton is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 7 JHorton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i dont know if this will help but i have two sites im hosting useing the virtual host method...but mine is set up like this
ServerName www.dukks.tzo.com:80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.dukks.tzo.com
DocumentRoot C:/public_html
</VirtualHost>
<VirtualHost *:80>
ServerName www.albumgirl.tzo.com
DocumentRoot C:/jenn_html
</VirtualHost>
they both are on the same port...but i did help a friend out with a router issue...he had a router installed and it was preventing anyone from comming in to view his sites...we had to go into the routers configuration area and tell it to allow traffic in...maybe one of these will help

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Apache virtual host weirdness


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway