From: thelma@sys-concept.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Apache 2.4 can not access server subdirectory
Date: Thu, 29 Oct 2020 13:59:45 -0600 [thread overview]
Message-ID: <d703975a-4210-5f35-fe1f-52f097e5f7dc@sys-concept.com> (raw)
In-Reply-To: <2746600.e9J7NaK4W3@lenovo.localdomain>
On 10/29/2020 10:53 AM, Michael wrote:
> On Thursday, 29 October 2020 14:10:07 GMT thelma@sys-concept.com wrote:
>> On 10/29/2020 06:21 AM, Remco Rijnders wrote:
>>> On Wed, Oct 28, 2020 at 10:36:12PM -0600, thelma wrote in
>>>
>>> <7b3d3416-77b0-02eb-ad05-f717fdf0b6a4@sys-concept.com>:
>>>> After installing apache 2.4 I can not access server subdirectory:
>>>> server/admin/index.html
>>>>
>>>> Forbiden
>>>> You don't have permission to access /admin/index.html on this server
>>>>
>>>> I can access index.html in a directory below /admin (server/index.html)
>>>> but not the server/admin/index.html
>>>
>>> That seems to suggest that either the permissions or ownership of
>>> admin/index.html are different from admin/server/index.html, or that
>>> there is a
>>> difference of that kind between the directories admin/ and admin/server.
>>> Are
>>> they?
>>
>> Here are the permissions:
>>
>> index on server/
>> -rw-r--r-- 1 root root 19078 Jan 14 2011 index.php
>
> The above is a .php file.
Yes, it is and I can read that file. The files that I can not access
are in:
server/admin/index.html
>
>
>> index on server/admin/
>> drwxr-xr-x 6 root root 4096 Oct 28 22:08 admin
>> -rwxrwxrwx 1 apache apache 428 Oct 28 16:44 index.html
>
> You shouldn't need apache:apache or 0777 ownership of this file which is very
> insecure, unless apache is meant to be editing it live. Normally root:root
> and 0755 is what is used.
Yes, I'll change that. I just use it temporarily as I run out of ideas
to try :-/
>
> Is 'server/' a subdirectory of '/var/www/'?
Yes
> .htaccess won't work if you have disabled it with 'AllowOverride None'.
Thank you for the pointer. I just change this directive in apache.conf
for /var/www/ and restarted apache but there is no difference. I still
can not access /server/admin/ directory from apache. server =
/var/www/html/catalog/
This is from apache.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
I just search all server .htaccess files for "AllowOverride" but none is
active in these files.
grep -Rnw '/var/www/html/catalog/' -e 'AllowOverride'
>
>> It works on Apache 2.2 but not Apache 2.4
>
> Directives changed on version 2.4. It would be worth familiarising yourself
> with the latest:
>
> https://httpd.apache.org/docs/2.4/upgrading.html
>
next prev parent reply other threads:[~2020-10-29 19:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 4:36 [gentoo-user] Apache 2.4 can not access server subdirectory thelma
2020-10-29 12:21 ` Remco Rijnders
2020-10-29 14:10 ` thelma
2020-10-29 16:40 ` Remco Rijnders
2020-10-29 16:53 ` Michael
2020-10-29 19:59 ` thelma [this message]
2020-10-30 10:31 ` Michael
2020-10-30 16:27 ` thelma
2020-10-30 17:55 ` Michael
2020-10-30 18:29 ` thelma
2020-10-30 18:34 ` Michael
2020-11-01 5:01 ` thelma
2020-11-01 10:04 ` [SOLVED] " Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d703975a-4210-5f35-fe1f-52f097e5f7dc@sys-concept.com \
--to=thelma@sys-concept.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox