You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bennett Haselton <be...@peacefire.org> on 2010/07/15 02:21:22 UTC

Re: [users@httpd] '403 forbidden' when trying to serve index.html

At 05:06 PM 7/14/2010, Frank Gingras wrote:


>On 07/14/2010 08:01 PM, Bennett Haselton wrote:
>>A consultant is giving me instructions for compiling a second copy of
>>Apache on my server to listen on a different port from the main Apache.
>>The second copy resides under /root/httpd, the httpd.conf file contains
>>the line
>>
>>DocumentRoot "/root/httpd/htdocs"
>>
>>so I assume that attempting to browse
>>http://66.148.71.117:8080/index.html should attempt to load the contents
>>of /root/httpd/htdocs/index.html. (This webserver is set to listen on
>>port 8080 so as not to conflict with the main webserver.)
>>
>>However, http://66.148.71.117:8080/index.html gives "403 Forbidden" and
>>we can't figure out why. Here's what I know:
>>
>>"ps auwx | grep httpd" shows several instances of:
>>
>>apache 4585 1.0 1.7 30656 17932 ? S 14:59 1:11 /usr/sbin/httpd
>>(the main webserver that was originally on the machine)
>>
>>and several instances of:
>>
>>daemon 7199 0.0 0.1 4700 1992 ? S 16:56 0:00 /root/httpd/bin/httpd 
>>-k start
>>
>>which is the test Apache. The permissions on
>>/root/httpd/htdocs/index.html are:
>>
>>[root@sls-ec5p18 bin]# ls -l /root/httpd/htdocs/index.html
>>-rw-r--r-- 1 daemon root 53 Jul 13 11:41 /root/httpd/htdocs/index.html
>>[root@sls-ec5p18 bin]#
>>
>>(that was after I changed ownership of the file to the "daemon" user to
>>see if that would enable Apache to read it, but it didn't).
>>
>>and selinux is disabled:
>>
>>[root@sls-ec5p18 bin]# sestatus
>>SELinux status: disabled
>>
>>Since index.html is world-readable, *and* in fact owned by the user
>>"daemon" (the same user that this custom build of Apache is running
>>under), any idea why index.html would be bringing up '403 forbidden'?
>>
>>-Bennett
>>
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server 
>>Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>" from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>
>How about the entry from the error log, first?
>
>Frank.

That just says:

[Wed Jul 14 17:17:17 2010] [error] [client 71.112.32.149] 
(13)Permission denied: access to /index.html denied

         -Bennett 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] '403 forbidden' when trying to serve index.html

Posted by Bennett Haselton <be...@peacefire.org>.
At 05:26 PM 7/14/2010, Frank Gingras wrote:
>>That just says:
>>
>>[Wed Jul 14 17:17:17 2010] [error] [client 71.112.32.149] (13)Permission
>>denied: access to /index.html denied
>>
>>-Bennett
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server 
>>Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>" from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>
>Bennet,
>
>Please read :
>
>http://wiki.apache.org/httpd/13PermissionDenied
>
>Frank.

Thanks, that fixed it!  I had to add world execute permissions for 
the /root directory.  After that the index.html page loaded fine. 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] '403 forbidden' when trying to serve index.html

Posted by Frank Gingras <fr...@gmail.com>.

On 07/14/2010 08:21 PM, Bennett Haselton wrote:
> At 05:06 PM 7/14/2010, Frank Gingras wrote:
>
>
>> On 07/14/2010 08:01 PM, Bennett Haselton wrote:
>>> A consultant is giving me instructions for compiling a second copy of
>>> Apache on my server to listen on a different port from the main Apache.
>>> The second copy resides under /root/httpd, the httpd.conf file contains
>>> the line
>>>
>>> DocumentRoot "/root/httpd/htdocs"
>>>
>>> so I assume that attempting to browse
>>> http://66.148.71.117:8080/index.html should attempt to load the contents
>>> of /root/httpd/htdocs/index.html. (This webserver is set to listen on
>>> port 8080 so as not to conflict with the main webserver.)
>>>
>>> However, http://66.148.71.117:8080/index.html gives "403 Forbidden" and
>>> we can't figure out why. Here's what I know:
>>>
>>> "ps auwx | grep httpd" shows several instances of:
>>>
>>> apache 4585 1.0 1.7 30656 17932 ? S 14:59 1:11 /usr/sbin/httpd
>>> (the main webserver that was originally on the machine)
>>>
>>> and several instances of:
>>>
>>> daemon 7199 0.0 0.1 4700 1992 ? S 16:56 0:00 /root/httpd/bin/httpd -k
>>> start
>>>
>>> which is the test Apache. The permissions on
>>> /root/httpd/htdocs/index.html are:
>>>
>>> [root@sls-ec5p18 bin]# ls -l /root/httpd/htdocs/index.html
>>> -rw-r--r-- 1 daemon root 53 Jul 13 11:41 /root/httpd/htdocs/index.html
>>> [root@sls-ec5p18 bin]#
>>>
>>> (that was after I changed ownership of the file to the "daemon" user to
>>> see if that would enable Apache to read it, but it didn't).
>>>
>>> and selinux is disabled:
>>>
>>> [root@sls-ec5p18 bin]# sestatus
>>> SELinux status: disabled
>>>
>>> Since index.html is world-readable, *and* in fact owned by the user
>>> "daemon" (the same user that this custom build of Apache is running
>>> under), any idea why index.html would be bringing up '403 forbidden'?
>>>
>>> -Bennett
>>>
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server
>>> Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>> How about the entry from the error log, first?
>>
>> Frank.
>
> That just says:
>
> [Wed Jul 14 17:17:17 2010] [error] [client 71.112.32.149] (13)Permission
> denied: access to /index.html denied
>
> -Bennett
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Bennet,

Please read :

http://wiki.apache.org/httpd/13PermissionDenied

Frank.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org