Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What a strange problem with apache 1.3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
strider2003
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 151
Location: Spain

PostPosted: Thu Feb 12, 2004 10:01 pm    Post subject: What a strange problem with apache 1.3 Reply with quote

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
View user's profile Send private message
Stalione
Guru
Guru


Joined: 21 Apr 2002
Posts: 335

PostPosted: Fri Feb 13, 2004 6:41 am    Post subject: Reply with quote

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
View user's profile Send private message
strider2003
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 151
Location: Spain

PostPosted: Fri Feb 13, 2004 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Stalione
Guru
Guru


Joined: 21 Apr 2002
Posts: 335

PostPosted: Fri Feb 13, 2004 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum