Q:

Can't get correct page by using "service nginx start " but ok by using "nginx"

Os: CentOS-7-x86_64-Minimal-1611 nginx: 1.2.1 (installed by
  yum) php: php7.0.1

I use service nginx start to start nginx, I got 403 forbidden
But when I use nginx, I get the correct page.
I've tried to change "nginx.conf",user nginx to user root, then I can't use service nginx start anymore (the same as service nginx restart/stop)
I have tried to change dir's group and user but failed.

A:

Rollback your changes in nginx.conf and then check SELinux status by sestatus or getenforce  command. If it returns enforcing set SELinux to permissive mode by setenforce 0 command and check nginx.
If it not works set your nginx root directory permission as follow :
chown nginx:nginx /path/to/nginx/root/directory
chmod 755 /path/to/nginx/root/directory

