美文网首页
lnmp1.4中nginx的配置laravel

lnmp1.4中nginx的配置laravel

作者: APHOME_明 | 来源:发表于2018-03-22 09:22 被阅读0次
    server
        {
            listen 8068;
            server_name localhost;
            index index.html index.htm index.php;
            root  /home/wwwroot/blog/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;
            }
        location ~ \.php$ { 
                fastcgi_pass 127.0.0.1:8068;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
            }
            access_log  /home/wwwlogs/blog.log;
        }
    
    

    相关文章

      网友评论

          本文标题:lnmp1.4中nginx的配置laravel

          本文链接:https://www.haomeiwen.com/subject/kpvoqftx.html