|
Home > Archive > Apache Server configuration support > January 2007 > Cant get pages to serve from a subdirectory
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Cant get pages to serve from a subdirectory
|
|
| alan.larkin@gmail.com 2007-01-25, 1: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.
| |
|
| 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. *
| |
| Davide Bianchi 2007-01-25, 1: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
| |
| alan.larkin@gmail.com 2007-01-25, 1: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/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.
| |
| alan.larkin@gmail.com 2007-01-25, 1: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.
| |
| Davide Bianchi 2007-01-25, 7:27 pm |
| 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
| |
| alan.larkin@gmail.com 2007-01-25, 7:27 pm |
|
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 unstable
> are vegetables? --Jeff Zahn
Thanks Davide, that fixed it.
|
|
|
|
|