NGINX, can't run php files inside subfolder in 'www' folder
Community Discussion 733 views · 2 replies ·
deive
deepin
2017-10-03 10:40
Author
Edited by deive at 2017-10-3 02:44
I'm a Linux user for about 5 hours now, choose Deepin to start because it is extremely beautiful and everywhere it show as "good for starters"...
I'm learning PHP, and in order to execute the files, I was told that NGINX was a great idea.
I was trying to change the "/usr/share/nginx/html" folder permissions so I could put my projects there and execute them. So i run the command
sudo chmod 777 -R /usr/share/nginx/html
Copy the Code
and obtained that permission, but I still can't acess subfolders in the browser. I created a "example" folder in "/usr/share/nginx/html" folder and inside that I created a "index.php" file, but when I go to the browser and try to execute it "127.0.0.1/example", it show "403 Forbidden".
Could someone help me? I just need to execute my webpages..
Reply Like 0 Favorite View the author
All Replies
zouqilin
deepin
2017-10-04 23:26
#1
本帖最后由 zouqilin 于 2017-10-4 15:28 编辑
you need php-fpm for nginx,ngx can not response php
I'm a Linux user for about 5 hours now, choose Deepin to start because it is extremely beautiful and everywhere it show as "good for starters"...
I'm learning PHP, and in order to execute the files, I was told that NGINX was a great idea.
I was trying to change the "/usr/share/nginx/html" folder permissions so I could put my projects there and execute them. So i run the command
Could someone help me? I just need to execute my webpages..