lnmp(vhost)配置

来源:互联网 发布:2016年网络端游排行榜 编辑:程序博客网 时间:2024/06/06 16:33

设置连接:https://lnmp.org/faq/lnmp-vhost-add-howto.html

server

    {
        listen 80;
        #listen [::]:80;
        server_name www.recruit_linux.com recruit_linux.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /usr/local/wwwroot/default/recruit/public;

        include none.conf;
        #error_page   404   /404.html;
        include enable-php.conf;

        location / {
            if (!-e $request_filename) {
            rewrite  ^(.*)$  /index.php?s=/$1  last;
            break;
            }
        }

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

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

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/www.recruit_linux.com.log;
    }
0 0
原创粉丝点击