View previous topic :: View next topic |
Author |
Message |
strider2003 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/754605591411902c3743ae.gif)
Joined: 14 Sep 2003 Posts: 151 Location: Spain
|
Posted: Thu Feb 12, 2004 10:01 pm Post subject: What a strange problem with apache 1.3 |
|
|
I'm running an Apache 1.3 server, with 2 virtual servers. This configuration works fine, but now I want to change the DocumentRoot of the second virtual server. I have made a directory under /home/httpd/htdocs, and I have given it the same permissions than the previous DocumentRoot. Files under this directories have also the same permissions.
I don't know why but, after restarting apache, I don't have access to the new DocumentRoot.
Quote: | You don't have permission to access / in this server |
If I reset the DocumentRoot, it works fine again.
This isn't a big problem, but I want to know why it is.
Thank you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Stalione Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 21 Apr 2002 Posts: 335
|
Posted: Fri Feb 13, 2004 6:41 am Post subject: |
|
|
I think it will help a great deal if you actually posted the virtual host config section. I have a feeling that you did not include the directory section in your virtualhost section:
Code: |
<Directory /some/new/vhost/docuroot>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
strider2003 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/754605591411902c3743ae.gif)
Joined: 14 Sep 2003 Posts: 151 Location: Spain
|
Posted: Fri Feb 13, 2004 2:43 pm Post subject: |
|
|
Look at this:
Code: |
$ls -l /home/httpd/htdocs/
drwxrwxr-x 2 apache apache 112 feb 12 22:52 martinp
drwxrwxr-x 12 apache apache 672 feb 12 22:48 project
|
the next configuration works:
Code: |
<VirtualHost *:8080>
ServerName mydomain.com
DocumentRoot /home/httpd/htdocs/martinp
</VirtualHost> |
and the next doesn't:
Code: |
<VirtualHost *:8080>
ServerName mydomain.com
DocumentRoot /home/httpd/htdocs/project
</VirtualHost>
|
You can see I have only changed a word. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Stalione Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 21 Apr 2002 Posts: 335
|
Posted: Fri Feb 13, 2004 7:47 pm Post subject: |
|
|
I am not sure if this is is a typo or you actually have it like this but both your virtualhosts are called mydomain.com. if these are indeed name based virtualhosts you cannot have the same names. I am surprised that apache even started up without erroring out. Did you do
Code: |
apachectl configtest
or
apache2ctl configtest
|
Are you trying to host namebased virtual host or IP based virtualhost? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|