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/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. > >> 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. * |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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. |