码迷,mamicode.com
首页 > 其他好文 > 详细

vhost配置

时间:2018-09-26 14:54:04      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:bsp   info   class   html   code   lis   css   host   include   

server
    {
        listen 80;
        server_name local.*****.com;
        index index.html index.htm index.php;
        root  /home/wwwroot/******/public;

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

        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 / {
            if (!-e $request_filename) {            //~~~~访问可以不加index.php
                rewrite  ^(.*)$  /index.php?s=/$1  last;
            }
        }


        access_log  /home/wwwlogs/access_dexin.log;
    }

 

vhost配置

标签:bsp   info   class   html   code   lis   css   host   include   

原文地址:https://www.cnblogs.com/pansidong/p/9706683.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!