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!
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!