I took ssd vds to play, lay out my scripts. I installed the LAMP stack, I move the document_root from the folder / var / www / to / home / username / srv / for stubbornly stubbornly gives 403 error.
I climb into Google, write - give the rights to the / srv folder to the www-data user. I do it differently - I add the user www-data to the username group. It turns out that the user’s group owner rights are now extended to the user, namely, the second digit in the access rights. And I have the rights to the folder 775.
Further more. I set 777 permissions on all folders, both down the tree and up. The same result. I add the user www-data to the root group. Again 403 error.
I checked from whom the Apache starts the process - www-data, everything is correct. Where to dig - I'll never know.
I spread the configuration file
GNU nano 2.2.6 File: /etc/apache2/sites-available/musaevhs.ru.conf <VirtualHost *:80> ServerName musaevhs.ru ServerAdmin [email]musaev.haybulla@gmail.com[/email] DocumentRoot /home/musaevhs/srv/public_html/ <Directory /home/musaevhs/srv/public_html> Options FollowSymLinks AllowOverride None Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Any thoughts that I missed?