Check the permissions of directories /var/www/vhosts/barelef_art/barelef-art.kiev.ua/ & /var/www/vhosts/barelef_art/.
When getting forbidden errors in either Nginx or Apache it is always worth working your way back up the tree of directories to ensure the web server can access at each level.
manpreet
Best Answer
3 years ago
I have few WordPress websites, all with same config - difference only with
useranddomain, but got 403 only for newly created virtualhost:# cat barelef-art.kiev.ua.conf server { server_name barelef-art.kiev.ua; access_log /var/log/nginx/barelef-art.kiev.ua-access.log; error_log /var/log/nginx/barelef-art.kiev.ua-error.log; root /var/www/vhosts/barelef_art/barelef-art.kiev.ua; https://forum.tuteehub.com/tag/location">location / { index index.php; } https://forum.tuteehub.com/tag/location">location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9012; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/vhosts/barelef_art/barelef-art.kiev.ua$fastcgi_script_name; } }And also - similar php-fpm configs for few sites:
User exist:
And virtualhost directory have correct owner:
But when I try open index.php - I got in log:
What I'm doing wrong?
Once again - same configuration files used for few websites with same CMS, and they works. One of them I added today morning. In evening - added this new - and it's don't work... Seems - I missed something, but - can't understood what and where.
CentOS 6.6, Nginx 1.6.2.
UPD
Adding index.html and open it directly with http://barelef-art.kiev.ua/index.html also returns 403;
psreturn correct user for PHP-FPM process:But it seems more NGINX issue...