I have problem with my centos 7 server and httpd. I have already install http, but i need change home dir from /var/www/html to /home/pawel/domains. I added vhost:
<VirtualHost *:80>
ServerName local.nauka
ServerAlias www.local.nauka
DocumentRoot /home/pawel/domains/nauka
<Directory "/home/pawel/domains/nauka">
AllowOverride All
Require all granted
</Directory>
ErrorLog /home/pawel/domains/nauka/error.log
CustomLog /home/pawel/domains/nauka/requests.log combined
</VirtualHost>
I execute this command:
systemctl enable httpd && systemctl start httpd
firewall-cmd --permanent --add-service={http,https}
firewall-cmd --reload
sudo setsebool -P httpd_enable_homedirs on
sudo chcon -R -t httpd_sys_content_t ~/domains/
sudo semanage fcontext -a -t httpd_sys_content_t "/home/pawel/domains(/.*)?"
sudo restorecon -R ~/domains/
setsebool -P httpd_can_network_connect 1
When i execute
ls -lZ ~/domains/
i got
drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 nauka
But when i open webrowser with url local.nauka i have
Forbidden
You don't have permission to access / on this server.
What i do wrong?