[CentOS] httpd on centos 7

Johnny Hughes
2014-10-23T12:30:31Z

On 10/23/2014 07:21 AM, Jerry Geis wrote:
> I have read the info on apache 2.4...
>
> I added to the bottom of httpd.conf these lines (and restarted httpd)
>
> -------------------------
> <Directory /var/www/html>
> # old 2.2 config
> # Order Allow,Deny
> # Allow from all
> AllowOverride None
> Require all granted
> </Directory>
>
> <Directory /home/silentm/public_html/gifs>
> AllowOverride None
> Require all granted
> </Directory>
>
> SuexecUsergroup silentm silentm
>
>
> ------------------
>
> So now I have access to the index.html page in /var/www/html
> so that is good. However, I do not have access to the user gifs
> /home/silentm/public_html/gifs
>
> The user silentm exists. I get a 404 error.
> 127.0.0.1 - - [23/Oct/2014:08:14:21 -0400] "GET
/~silentm/gifs/smlogo.jpg
> HTTP/1.1" 404 222 "-" "curl/7.29.0"
>
> All the files are there - all owned by silentm.
>
>
> What did I miss to access the gifs?


Lots of potential issues:

1.  /home/ is not labeled correctly for httpd stuff if selinux is on.

You would need to chcon the /public_html/ dir to label it for httpd

2. if that is a user's home, it likely got created looking like this:

drwx------. 132 jhughes jhughes 12288 Oct 23 06:21 jhughes

you would need to give apache permission for access .. so that would
likely need to become

drwxr-xr-x.

(chmod 755)

also, you would need to make public_html under the home chmod 755 as well.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.centos.org/pipermail/centos/attachments/20141023/07c38559/attachment-0003.sig>