尝试访问index.php时未find404

最近我重新安装了Ubuntu 14.04 LTS,nginx / 1.6.1和php5-fpm的服务器。 当我尝试访问index.html它正在工作,当我尝试访问index.php我得到“404未find”。 我再次检查.conf文件,我无法find问题。

server { listen myip:80; server_name www.example.com; rewrite ^(.*) http:// example.com$1 permanent; } server { listen myip:80; server_name example.com; root /var/www; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.html; } access_log off; error_log /var/www/error.log; rewrite_log on; error_page 403 404 /404.html; error_page 500 502 503 504 /404.html; location = /404.html { root /var/www; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; # With php5-fpm: #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 ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { expires 365d; } } 

请帮忙。 谢谢!

事实certificate是“502错误的网关”,而不是“404未find”,我已经find了我的问题的答案在这里https://stackoverflow.com/a/16497957/1845728