Control Web Panel

WebPanel => Apache => Nginx => Topic started by: tabestmaker on September 24, 2020, 05:51:33 PM

Title: NGINX + Varnish Only for wordpress Problems
Post by: tabestmaker on September 24, 2020, 05:51:33 PM
hello i am trying to set up nginx only for wordpress site but keep getting 403 forbidden on homepage and 404 on all subpages
itried adding          try_files $uri $uri/ /index.php$is_args$args; inside     location / {    } in /etc/nginx/conf.d/vhosts/.....com.conf
but nothing works
Title: Re: NGINX + Varnish Only for wordpress Problems
Post by: studio4host on September 24, 2020, 10:28:08 PM
as usual for any other issue, you need to check the server logs as mentioned on the cwp wiki
Title: Re: NGINX + Varnish Only for wordpress Problems
Post by: tabestmaker on September 24, 2020, 10:48:36 PM
i checked /var/log/nginx/
but the files were empty
Title: Re: NGINX + Varnish Only for wordpress Problems
Post by: tabestmaker on September 29, 2020, 06:19:49 PM
UPDATE
here are the logs
2020/09/29 19:10:12 [error] 27863#27863: *309282 "/home/afkarla/public_html/******.com/index.php" is forbidden (13: Permission denied), client: , server: ******.com, request: "GET / HTTP/1.1", host: "*****.com"

i have tried fix permission in cwp admin but problem is still there
Title: Re: NGINX + Varnish Only for wordpress Problems
Post by: tabestmaker on September 29, 2020, 06:36:38 PM
i applied
find /home/afkarla/public_html/***.com/ -type f -print0 | xargs -0 chmod 0644
and now everything works it seems fix permissions doesn't work when using multiple configuration
thanks for the help :)