Cant get pages to serve from a subdirectory

This is a discussion on Cant get pages to serve from a subdirectory within the Apache Web Server forums, part of the Web Server and Related Forums category; I cant get pages to serve from a subdirectory. >From httpd.conf: Alias /mysite/ "/usr/local/apache2/htdocs/...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-25-2007
alan.larkin@gmail.com
 
Posts: n/a
Default Cant get pages to serve from a subdirectory

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.

  #2 (permalink)  
Old 01-25-2007
Rik
 
Posts: n/a
Default Re: Cant get pages to serve from a subdirectory

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

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


..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. *
  #3 (permalink)  
Old 01-25-2007
alan.larkin@gmail.com
 
Posts: n/a
Default Re: Cant get pages to serve from a subdirectory



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:
> > 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 inhttp://myserver/mysiteserves, but anything in
> >http://myserver/mysite/mysubdiris 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. *


The parents .htaccess contains:

php_flag magic_quotes_gpc off
php_value include_path
..:/usr/local/apache2/htdocs/mysite:/usr/local/apache2/htdocs/mysite/mysubdir/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.

  #4 (permalink)  
Old 01-25-2007
alan.larkin@gmail.com
 
Posts: n/a
Default Re: Cant get pages to serve from a subdirectory



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:
>
> > 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 inhttp://myserver/mysiteserves, but anything in
> >http://myserver/mysite/mysubdiris forbiddenWhich 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


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.

  #5 (permalink)  
Old 01-25-2007
alan.larkin@gmail.com
 
Posts: n/a
Default Re: Cant get pages to serve from a subdirectory



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:
>
> > 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 readableYep, 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



Thanks Davide, that fixed it.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:00 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0