• nginx 反向代理案例


    server{
        listen 443 ssl;
        server_name a.xxxxx.com;
        root /home/wwwroot/default/asqumo;
            ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
            ssl_certificate a.xxxxx.com.crt;
            ssl_certificate_key a.xxxxx.com.key;
            ssl_prefer_server_ciphers on;
    
            # access_log  /home/wwwlogs/accesslog/xxxxx.log ;
        location / {
            if ($request_uri ~ ^/xxxxxx/) {
                proxy_pass http://xxxxxx.sheep.xxxx.com;
            }
    
                    if ($request_uri ~ ^/xxxxxx/) {
                             proxy_pass http://xxxxxx.healxx.com;
                    }
    
    
        }
    
        location ~ .*.(gif|jpg|jpeg|png|ico|bmp|swf|js|css|html)$
            {
                    root /home/wwwroot/default/static/******/Public/;
                    expires      30d;
            }
    }
    
    
    
    
    server{
            listen 80;
            server_name xxxxxx.xxxxx.com;
            index index.html index.htm index.php;
            root  /home/wwwroot/default/xxxx/store/Public;
    
            #error_page   404   /404.html;
            #include enable-php.conf;
            include enable-php-pathinfo.conf;
            location /nginx_status
            {
                stub_status on;
                access_log   off;
            }
    
        location / {
               if (!-e $request_filename) {
                   rewrite ^/xxxxxxxx/(.*)$ /api.php?s=$1 last;
                   break;
            rewrite  ^(.*)$  /index.php?s=/$1  last;
               }
            }
    
            location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires      30d;
            }
    
            location ~ .*.(js|css)?$
            {
                expires      12h;
            }
    
            location ~ /.
            {
                deny all;
            }
    
            access_log  /home/wwwlogs/xxxxxx_access.log  access;
    }
  • 相关阅读:
    STL常用容器☞String容器
    初识STL
    函数模板
    多态
    运算符重载
    友元
    对象的初始化和清理
    C++内存分区模型
    传值和传地址
    const的使用
  • 原文地址:https://www.cnblogs.com/pansidong/p/10700295.html
Copyright © 2020-2023  润新知