幾種可能的情況
1,偽靜態設置是否正確,參考如下
location / { index index.html index.htm index.php; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } }
2,在windows下配置nginx站點時設置的路徑名是有問題的
比如路徑 c:\www\html\public 放如配置文件中指定路徑時必須把路徑分隔符寫成反方向分隔符 '/'
不然也會出現文件無法訪問到的問題。
listen 8012; server_name www.estate.com estate.com; root "C:/www/html/public";