zoukankan      html  css  js  c++  java
  • LNMP 基于域名的虚拟主机配置 (Centos5.6)

    .

    .

    server
        {
            listen 80;
            #listen [::]:80 default_server ipv6only=on;
            server_name www.blog.com;
            index index.html index.htm index.php;
            root  /home/wwwroot/blog/public;
    
    
            #error_page   404   /404.html;
            include enable-php.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;
            }
    
            access_log  /home/wwwlogs/access.www.blog.com.log  access;
        }
    
    server
        {
            listen 80;
            #listen [::]:80 default_server ipv6only=on;
            server_name www.yiibasic.com;
            index index.html index.htm index.php;
            root  /home/wwwroot/yiibasic/web;
    
    
            #error_page   404   /404.html;
            include enable-php.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;
            }
    
            access_log  /home/wwwlogs/access.www.yiibasic.com.log  access;
        }

    .

  • 相关阅读:
    php函数
    php循环语句(二)
    php循环语句(一)
    php魔术常量
    php超级全局变量
    php数组函数
    php数组
    php条件语句(二)
    php条件语句(一)
    shell 中的判断
  • 原文地址:https://www.cnblogs.com/jiufen/p/5073600.html
Copyright © 2011-2022 走看看