I have been trying to get wordpress work with nginx its new task for me but I am almost done.
But I am still at the end can't get wordpress to work I have tried everything I was able to get and the same issue exactly and the solution approved, but didn't work for me.
017/01/28 10:54:22 [crit] 3576#3576: *65 stat() "/home/wptask/public_html/wp-admin/install.php" failed (13: Permission denied), client: 127.0.0.1, server: firtswebsite.com, request: "GET /wp-admin/install.php HTTP/1.1", host: "127.0.0.1"
2017/01/28 10:53:36 [crit] 3576#3576: *1 stat() "/home/wptask/public_html/wp-admin/install.php" failed (13: Permission denied), client: 192.168.10.1, server: firtswebsite.com, request: "GET /wp-admin/install.php HTTP/1.1", host: "192.168.10.10"
I did this
chmod +x /home
chmod +x /home/wptask
chmod +x /home/wptask/public_html
sudo chown -R wptask:wptask /home/wptask
chmod go-rwx /home/wptask
chmod go+x /home/wptask
chgrp -R wptask /home/wptask
chmod -R go-rwx /home/wptask
chmod -R g+rx /home/wptask
chmod -R g+rwx /home/wptask
and even chmod 755 /home/wptask
but non works for me
Update :- ls -l for the webroot
[root@web-srv ~]# ls -l /home/wptask/
drwxr-sr-x. 2 root root 41 Jan 30 07:01 logs
drwxr-sr-x. 5 root root 4096 Jan 28 08:41 public_html
nginx.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/sites-enabled/*;
include /etc/nginx/conf.d/*.conf;
}
Fix Update :-
ls -l webroot
[root@web-srv ~]# ls -l /home/wptask/
total 4
drwxr-s---. 2 wptask wptask 41 Jan 30 07:01 logs
drwxr-s---. 5 wptask wptask 4096 Jan 28 08:41 public_html
and i changed the nginx user in nginx.conf