lnmp1.4中nginx的配置laravel

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)