Problems setting up virtual hosts with debian sarge and apache2
Versions: Debian Sarge, Apache2
Goal: Set up apache2 with a virtual servers. If I type "pince" into the browser, I want to go to the default page. If I type in "rt", I want to go to the home page for virtual host rt. What I've done so far: -added my two hosts to the /etc hosts file like this: Code:
127.0.0.1 localhost.localdomain localhost pince rt -typed in "pince" in a locally run browser and gotten the apache2 default page -copied the /etc/apache2/available-sites/default file to /etc/apache2/available-sites/rt -change the DocumentRoot and Directory settings in rt to /var/www/rt -created directory /var/www/rt shame with same permissions as /var/www/apache2-default -copied over the index.html.en file to /var/www/rt and changed the contents so I know when I hit it. -in directory /etc/apache2/sites-enabled, I created a symbolic link Code:
ln -s /etc/apache2/sites-available/rt rt What happens When I type in "pince", I now get a 404 error. Here's the error log: Code:
[Sun Nov 20 09:48:24 2005] [debug] /home/adconrad/build/apache2/security/sarge/apache2-2.0.54/build-tree/apache2/modules/mappers/mod_alias.c(438): [client 127.0.0.1] incomplete redirection target of '/apache2-default/' for URI '/' modified to 'http://pince/apache2-default/' TIA Dave |
I just set up apache2 today, here should be the solution:
You need to remove line 17 from the rt configuration file:
Code:
RedirectMatch ^/$ /apache2-default/ You may also want to remove this section, which effectively symlinks in the apache2 documentation into your virtualhost. It won't hurt to leave it in though. Code:
Alias /doc/ "/usr/share/doc/" |
All times are GMT -5. The time now is 09:35 AM. |