I recently switched my CentOS 7 machine from Apache to nginx, and I am running into some issues getting my machine properly functioning. I recently installed a new server block into the system with the following configuration:
server {
listen 80;
server_name example.com;
root /usr/share/nginx/example.com/public_html;
access_log example.com/logs/example.com_access.log;
error_log example.com/logs/example.com_error.log crit;
location / {
index index.html index.htm;
}
}
However, whenever I go to the homepage (e.g. example.com), I am given a 403 error on the page. Additionally, I've noted that I get the same result whenever I add anything to one of my already existing server blocks that I imported from Apache virtual hosts. The files I imported originally work as expected, but whenever I write new content, I also get a 403 error on those pages.
The owner and group of the public web directory is myuser:nginx
(I want to edit files as part of the group nginx, but that's already in another question). The public web root has had chmod -R 755
run on it as well.
I am confused about where to proceed or how to debug this further. What could be causing the issue?