Apache 2 / Mandrake ADVX / Virtual host help needed $$$

One_Eye

Limp Gawd
Joined
Mar 22, 2000
Messages
215
I am having dificulty with named virtual hosts. Using Mandrake 10.0 official, with ADVX apache (apache 2), I also have two test servers with Mandrake 10.1 and ADVX apache. I have searched and read quite a lot of posts here and elswehere and tried many of the suggestions. I have read and followed the doc at apache.org for 2.0 Virtual host, and I have read the included ADVX docs. I am obviously missing something.

If I understand correctly in ADVX we have httpd.conf, which can include additional config files such as Vhosts.conf. So far I get it. Makes sense too.

So I include Vhosts.conf in httpd.conf, and set up my virtual hosts in Vhosts.conf. Ok. But it doesnt work. I have tried many things. I only have one IP address, and I would like to have:

www.domain.com

test.domain.com

example.domain.com

etc.

I had this same setup in apache 1.3 and it worked well for me.



Below I have listed my basic settings, and listed the issue I am having:



in /etc/httpd/conf/httpd.conf I have:



Include conf/vhosts/Vhosts.conf



in /etc/httpd/conf/vhost/Vhosts.conf I have:



NameVirtualHost 111.111.111.111:*

NameVirtualHost 111.111.111.111

<VirtualHost 111.111.111.111:80>

DocumentRoot /www/html

ServerName www.domain.com

ServerPath /www.domain.com

</VirtualHost>

<VirtualHost 111.111.111.111:80>

DocumentRoot /www/html/test

ServerName test.domain.com

ServerPath /test.domain.com

</VirtualHost>

I have also played with the Directory directives in commonhttpd.conf they are :

<Directory /var/www/html>

Options -All -Multiviews

AllowOverride None

<IfModule mod_access.c>

Order deny,allow

allow from all

</IfModule>

</Directory>

Alias /test /var/www/html/test

<Directory /var/www/html/test>

AllowOverride All

Options Indexes FollowSymLinks MultiViews

Options -All -Multiviews

AllowOverride None

<IfModule mod_access.c>

Order deny,allow

allow from all

</IfModule>

</Directory>



The IP and domain I use are correct, I just used ones and domain here for example.



When I go to www.domain.com I get the correct site. When I go to test.domain.com I get the main site, not the page I have for test. If I go to www.domain.com/test I do get the correct test index page.

I have been stuggling with this for quite a while, and now am up against a project deadline. I guess I can go back to apache 1.3, but I would sure like to make this work. If there are any Apache gurus out there with a pay pal account maybe we can arrange a payment for config services.

Thanks to anyone who replies!

 
Your virtual host configuration looks correct to me. It's essentially identical to what we use at work (just with different names, and we just use * for the IP address).

Are you sure it's even looking at your Vhosts.conf? Try breaking the syntax in an obvious way and see if it complains.

Any chance your browser has just cached an old, incorrect version of test.domain.com? Is there any way that your browser or network setup might be translating test.domain.com into www.domain.com before the HTTP request even gets to the webserver?
 
Well I have used * as well. Honestly, I have tried so many things my head is spinning. :) I am interested in your comment
translating test.domain.com into www.domain.com
That is a dang good question. Not sure how I would check this though. (how would I check ) ? Man I have done this in 1.3 easily. I am sure I am in the right config. file. I also have a host record for each name in my hosts file, though that probably isnt needed.

I also recently realized my dns provider (no-ip.com) does not do reverse dns. is that an issue? also, this is static IP not dynamic dns, just used no-ip cause its easy.

The other thing that is strange, is that this happens on all three of my servers. two are on cable modems ( my home and a friends) and the one I posetd about is at my office. So either its me (most likely) or something in the Mandrake / ADVX version of apache is really different.


Thanks for your post, if you think of anything else please post!
 
I don't think it's all that likely that some sort of undesired translation is happening, but it seems like it might explain the symptoms. The only way I can think of to check for it is to look at the server logs. If you're not currently set up this way, you'll want to get Apache to log the entire requested URL, not just the relative path name (which I believe is all it records by default). That will tell you exactly what the webserver is looking at when trying to figure out what VH to serve from.


One_Eye said:
So either its me (most likely) or something in the Mandrake / ADVX version of apache is really different.
I also worry that the ADVX version of Apache is different in some way. I wasn't going to bring it up, but since it's on the table: Is there any reason ADVX is preferable to just installing Apache, PHP, MySQL, and such by themselves? I looked at the ADVX website, and it really didn't offer much evidence that it was an improvement over other methods for setting up LAMP.
 
I also worry that the ADVX version of Apache is different in some way. I wasn't going to bring it up, but since it's on the table: Is there any reason ADVX is preferable to just installing Apache, PHP, MySQL, and such by themselves? I looked at the ADVX website, and it really didn't offer much evidence that it was an improvement over other methods for setting up LAMP
I cannot see any reason why I need ADVX. Its nice that my LAMP enviroment sets up tight with every thing I need, but your right, there is really not much info on it, or why its an improvement. I have several posts on mandrakes forums, but not much help there. Seems users there do not know much about it either. I used to use Apache Toolkit, which was a nice way to go. I may do that again.

As far as the logs go I set them to debug level. I will check and see what else I can change to make them more verbose. Thanks again for your help!
 
Back
Top