lnmp一键安装包配置laravel项目


lnmp一键安装包:https://lnmp.org/install.html

在server中加入

location /
        {
            try_files $uri $uri/ /index.php?$query_string;
        }

整体server的配置如下:

server
    {
        listen 80;
        server_name localhost;
        index index.html index.htm index.php;
        root  /home/wwwroot/test/public/;

        #error_page   404   /404.html;
        include /usr/local/nginx/conf/enable-php.conf;

        location /
        {
            try_files $uri $uri/ /index.php?$query_string;
        }

        location /nginx_status
        {
            stub_status on;
            access_log   off;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/www.test.com.access.log;

    }

 

QQ技术交流群:576269252

--------------------------------------

声明: 原创文章,未经允许,禁止转载!

--------------------------------------


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM