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?
The PermissionError: [errno 13] permission denied error occurs when you try to access a file from Python without having the necessary permissions. To fix this error, use the chmod or chown command to change the permissions of the file so that the right user and/or group can access the file.
When a user visits a URL that requests a directory, the web server looks for a file in the given directory. If the file or any similar files are not found, and directory index listings are disabled, the web server displays the '403 Forbidden' error message. To fix the issue, add a default directory index.
(13) Permission Denied. Error 13 indicates a filesystem permissions problem. That is, Apache was denied access to a file or directory due to incorrect permissions. It does not, in general, imply a problem in the Apache configuration files.
Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With