php - Can't get correct page by using "service nginx start " but ok by using "nginx"Get the solution ↓↓↓
nginx: 1.2.1 (installed by yum)
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.
Rollback your changes in nginx.conf and then check SELinux status by
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
Share solution ↓
Link To Answer People are also looking for solutions of the problem: uncaught error: call to undefined function mysqli_connect()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.