|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Apache virtual host weirdness |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|