Cant get pages to serve from a subdirectory
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Cant get pages to serve from a subdirectory




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Cant get pages to serve from a subdirectory  
alan.larkin@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-07 06:21 PM

I cant get pages to serve from a subdirectory.

>From httpd.conf:

Alias /mysite/ "/usr/local/apache2/htdocs/mysite/"
<Directory "/usr/local/apache2/htdocs/mysite/">
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Anything in http://myserver/mysite serves, but anything in
http://myserver/mysite/mysubdir is forbidden ("You don't have
permission to access ... ").

The contents of the mysubdir have precisely the same ownership and
permissions as those in the directory mysite. mysite has a .htaccess
which restricts access to a number of pages. mysubdir has no .htaccess.
Commenting out everything in the <Directory ...> above makes no
difference.

Thanks for your suggestions.






[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
Rik


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-07 06:21 PM

On Thu, 25 Jan 2007 15:00:09 +0100, <alan.larkin@gmail.com> wrote:

> I cant get pages to serve from a subdirectory.
> 
>
> Alias /mysite/ "/usr/local/apache2/htdocs/mysite/"
> <Directory "/usr/local/apache2/htdocs/mysite/">
>        AllowOverride All
>        Order allow,deny
>        Allow from all
> </Directory>
>
> Anything in http://myserver/mysite serves, but anything in
> http://myserver/mysite/mysubdir is forbidden ("You don't have
> permission to access ... ").
>
> The contents of the mysubdir have precisely the same ownership and
> permissions as those in the directory mysite. mysite has a .htaccess
> which restricts access to a number of pages. mysubdir has no .htaccess.

.htaccess in a parent dir is also checked when accessing that dir.
What's in the .htaccess exactly?
--
Rik Wasmus
* I'm testing several new newsreaders at the moment. Please excuse
possible errors and weird content. *





[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-07 06:21 PM

On 2007-01-25, alan.larkin@gmail.com <alan.larkin@gmail.com> wrote:
> I cant get pages to serve from a subdirectory.

> Alias /mysite/ "/usr/local/apache2/htdocs/mysite/"
><Directory "/usr/local/apache2/htdocs/mysite/">
>        AllowOverride All
>        Order allow,deny
>        Allow from all
></Directory>

> Anything in http://myserver/mysite serves, but anything in
> http://myserver/mysite/mysubdir is forbidden

Which error is reported in the error_log ?

> The contents of the mysubdir have precisely the same ownership and
> permissions as those in the directory mysite.

But the directory itself has the same permission as his parent?

Davide

--
Your mouse has moved. Windows NT must be restarted for the change
to take effect. Reboot now?  [ OK ]
-- From a Slashdot.org post





[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
alan.larkin@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-07 06:21 PM



On Jan 25, 2:11 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
> On Thu, 25 Jan 2007 15:00:09 +0100, <alan.lar...@gmail.com> wrote: 
> 
> 
> 
> 
> What's in the .htaccess exactly?
> --
> Rik Wasmus
> * I'm testing several new newsreaders at the moment. Please excuse
> possible errors and weird content. *

The parents .htaccess contains:

php_flag magic_quotes_gpc off
php_value include_path
.:/usr/local/apache2/htdocs/mysite:/usr/local/apache2/htdocs/mysite/mysubdi
r/geshi
DirectoryIndex index.php

and a number of these:

<FilesMatch xxxx>
AuthType Basic
AuthName "Restricted Section"
AuthUserFile /usr/local/apache2/htdocs/mysite/.htpasswd
Require user admin
Options +Indexes
</FilesMatch>

that match specific files in the parent directory so I dont think its
the problem. BTW, neither php nor html are severd from mysdir.

Thanks.






[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
alan.larkin@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-07 06:21 PM



On Jan 25, 2:06 pm, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-01-25, alan.lar...@gmail.com <alan.lar...@gmail.com> wrote:
> 
> 
>
> Davide
>
> --
> Your mouse has moved. Windows NT must be restarted for the change
> to take effect. Reboot now?  [ OK ]
>    -- From a Slashdot.org post

Everything under mydir is 744 and owned and grouped by me.

The access log records 403 and 451 for attempts to access files in
mysubdir.

The error log has

Permission denied: /usr/local/apache2/htdocs/mydir/mysubdir/.htaccess
pcfg_openfile: unable to check htaccess file, ensure it is readable

Ah ... there is no .htaccess in the subdir, but does why does there
need to be one?

Thanks.






[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-26-07 12:27 AM

On 2007-01-25, alan.larkin@gmail.com <alan.larkin@gmail.com> wrote:
> Everything under mydir is 744 and owned and grouped by me.

744? Try making that a 755 (give the Execute permission too)

> Permission denied: /usr/local/apache2/htdocs/mydir/mysubdir/.htaccess
> pcfg_openfile: unable to check htaccess file, ensure it is readable

Yep, that is because the directory isn't "executable" so Apache can't
"scan" it to see if there is an .htaccess file. Chmod 755 /mydir/mysubdir
should fix it.

Davide

--
[It] contains "vegetable stabilizer" which sounds ominous.  How unstable
are vegetables? --Jeff Zahn





[ Post a follow-up to this message ]



    Re: Cant get pages to serve from a subdirectory  
alan.larkin@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-26-07 12:27 AM



On Jan 25, 7:30 pm, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-01-25, alan.lar...@gmail.com <alan.lar...@gmail.com> wrote:
> 
> 
> "scan" it to see if there is an .htaccess file. Chmod 755 /mydir/mysubdir
> should fix it.
>
> Davide
>
> --
> [It] contains "vegetable stabilizer" which sounds ominous.  How unstab
le
> are vegetables? --Jeff Zahn


Thanks Davide, that fixed it.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:12 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register