Nginx + php_fpm環境を設定してて問題なかったのに
http://(サーバードメイン)/sample
にアクセスするとエラーが..
2016/05/14 16:37:55 [error] 7942#0: *621 directory index of "/usr/share/nginx/html/sample/" is forbidden
http://(サーバードメイン)/sample/index.php
だと問題ない..ちょっと考えたらわかるのにはまりました..
nginxの設定ファイルを確認
server {                                                                           
    listen       80;                                                                                                                                                                                         
    server_name  sample.co.jp;                                       
    root   /usr/share/nginx/html;                                               
    access_log  /var/log/nginx/base-access.log  main;                           
    error_log  /var/log/nginx/base-error.log warn;                              
    location / {                                                                
        index  index.html index.htm;                                            
    }                                                                           
    #error_page  404              /404.html;                                    
    # redirect server error pages to the static page /50x.html                  
    #                                                                           
    error_page   500 502 503 504  /50x.html;                                    
    location = /50x.html {                                                      
        root   /usr/share/nginx/html;                                           
    }                                                                           
    # pass the PHP scripts to FastCGI server                                    
    #                                                                           
    location ~ \.php$ {                                                         
        fastcgi_pass   unix:/var/run/php5-fpm.sock;                             
        fastcgi_index  index.php;                                               
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        
        include        fastcgi_params;                                          
    }                                                                           
} 
location /
の下に index.php がないですね..ファイルがないのでエラーになってたようです
追加して解決しました




