Apache 2.0.54 DocRoot strange behaviour with VirtualHost
Hi
OS: FC4 Apache v2.0.54 Server IP: 1.2.3.4 Server FQDN: main.mydomain.com vDomain1: space.com vDomain1: space.info Symptom: i can not access web file reside in main Server's DocumentRoot (/var/www/html) after I made VirtualHost configuration. Instead I found my self in the DocumentRoot of one of the Virtual Hosts I definded (/var/www/space.com/html). This may because of my Confinuration. In "httpd.conf" I have: Quote:
Quote:
Quote:
I have phpAdsNew in "/var/www/html/phpAdsNew" and I can not reach it. Every time I request the one of the following URLs: http://1.2.3.4/ http://main.domain.com/ I got the page that resides in "/var/www/space.com/html" which is the DoumentRoot for the first VHost I have definded. The request for http://1.2.3.4/phpAdsNew returns Not Found. Why does this happened, why i am in the htdocs of the first VHost not the second one for example (even I do not want this to happen at all) I want to be in the main DocRoot? That does not make sence for me. Any Suggestions? Thanks in advance. |
Instead of NameVirtualHost 1.2.3.4:80, try NameVirtualHost *:80
That should fix your problem. |
Thanks for the replay , I have my replay late because I was busy with tomcat issues, I am thinking really in moving to Tomcat instead.
"NameVirtualHost *:80" , This does not work, instead, I have made a virtual host for the main server, that is like this : <VirtualHost 1.2.3.4:80> ServerName main.mydomain.com</VirtualHost> so my main httpd doc root becomes a virtual host inbetween the others and it MUST be definded as the first VirtualHost or it will not serve the main index page as supposed to. I begin to feel that apache does not serve me well, and it is not documented well. |
All times are GMT -5. The time now is 08:52 AM. |