linuxにnginxを入れてその中にphpを入れてwebサーバーを作りたいと考えているのですが、
ドキュメントディレクトリにあるphpファイルはurlを入れると表示されるのですがそれ以下のしたの階層は見ることが出来ません。
例 http://localhost/test/index.php →見れる
http://localhost/test/tes/index.php →見れない
nginxで開発を初めてまだ数日しか立っていないので簡単な質問ならすいません。
ちなみにchmodでtes及びtestには777で権限を与えています。
分かる方教えていただけますか。
server
1 listen 80; 2 server_name www.sample.com; 3 include /etc/nginx/default.d/*.conf; 4 5 location ~ ^/assets/ { 6 root /var/www/test; 7 } 8 location / { 9 root /var/www/test; 10 #root /usr/share/nginx/html; 11 #index index.html index.htm; 12 index index.php; 13 } 14 15 error_page 404 /404.html; 16 location = /404.html { 17 root /usr/share/nginx/html; 18 } 19 20 # redirect server error pages to the static page /50x.html 21 # 22 error_page 500 502 503 504 /50x.html; 23 location = /50x.html { 24 root /usr/share/nginx/html; 25 } 26 location ~ \.php$ { 27 root /var/www/test/*; 28 fastcgi_pass 127.0.0.1:9000; 29 fastcgi_index index.php; 30 fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name; 31 include fastcgi_params; 32 } 33 location ~ /\.ht { 34 #deny all; 35 } 36} 37
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。