windows nginx配置laravel

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;

        }

转载请注明出处:

转载自http://lxfamn.cn/blog

未经允许不得转载:lxfamn » windows nginx配置laravel

赞 (0) 打赏

置顶推荐

评论 0

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏