location / 配置可以解决无法访问静态资源的问题
listen 9089;
server_name localhost;
root html/srmh5/public;
index index.html index.htm index.php;
#charset koi8-r;
#access_log logs/host.access.log main;
# location / {
# root html/srmh5/public;
# index index.html index.htm;
#}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
转载请注明出处:
未经允许不得转载:lxfamn » windows nginx配置laravel