0
我在symfony2中遇到了問題,當我嘗試在nginx上運行此項目時。Symfony2 nginx問題 - 404頁未找到,並且在加載網頁調試工具欄時發生404頁面
www.domain /正常工作
www.domain/app_dev.php,「加載網頁調試工具(404:未找到)發生錯誤?。做你想要打開的仿形」
www.domain/app.php/someurl/- 404未找到
/etc/nginx/site-available/example.com
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/adwords-up;
index app_dev.php;
# Make site accessible from http://localhost/
server_name adwords-up.test;
location/{
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.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;
}
}
謝謝,但它沒有幫助 –