mennanov
mennanov

Reputation: 1245

Apache 403 error, (13)Permission denied: access to / denied, Fedora 16

I've just set up apache on my Fedora 16. And i can't get my vhosts working!

Though localhost/phpmyadmin works fine..

I got this in my httpd.conf

<Directory /home/renat/www>
AllowOverride All
Options +Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName fabbro.fm
    DocumentRoot /home/renat/www/fabbro
</VirtualHost>

Everything is fine with permissions too:

    ls -l
    drwxr-xr-x. 32 renat renat 4096 янв.   7 16:12 www

And i've got 403 error when try to access fabbro.fm error_log says:

[client 127.0.0.1] (13)Permission denied: access to / denied

What do i have to do?

Upvotes: 11

Views: 29249

Answers (5)

awlich
awlich

Reputation: 1

chmod +x /home/"user"

Upvotes: 0

mennanov
mennanov

Reputation: 1245

I solved this problem! Apache could not access those directories because of the SELinux security settings. All i had to do is to apply this command to the directory in the path to document root:

chcon -R -t httpd_sys_content_t

Upvotes: 26

Keshav
Keshav

Reputation: 33

I had to run the following to make it work. chcon and setsebool mentioned earlier did not help.

firewall-cmd --add-service=http

This is on Fedora release 20 (Heisenbug), btw.

Upvotes: 1

Michael Munsey
Michael Munsey

Reputation: 3870

I had a SELinux issue. I first tried chcon -t httpd_sys_content_t but that didn't fix it. After that I did setsebool -P httpd_read_user_content 1 and it worked. I don't know if the first command was necessary or only the second.

Upvotes: 2

Pekka
Pekka

Reputation: 449613

This line:

[client 127.0.0.1] (13)Permission denied: access to / denied

makes me think there is a misconfiguration somewhere - a second VirtualHost for example, or a global DocumentRoot definition.

That second definition is somehow setting DocumentRoot to the system's root directory. Apache is right to deny that.

You need to find the definition that is causing this, and remove it.

Upvotes: 1

Related Questions