zoukankan      html  css  js  c++  java
  • nginx配置多个静态资源

    #user  nobody;
    worker_processes 4;
    
    worker_cpu_affinity 0001 0010 0100 1000;
    
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
        client_max_body_size  20m; 
    
        sendfile        on;
        keepalive_timeout  65;
        underscores_in_headers on;
    
        upstream fdfs_group1 {
            server 127.0.0.1:9011;
        }
        #gzip  on;
    
        server {
                listen       80;
                server_name dev.dongshanhaibao.com;     
                #charset koi8-r;
    
                #access_log  logs/host.access.log  main;
             rewrite ^(.*)$  https://$host$1 permanent;  
        }
    
           server {
                listen       443 ssl;
                server_name  dev.dongshanhaibao.com;
    
            ssl on;
                   ssl_certificate      ssl/2844030_dev.dongshanhaibao.com.pem;
                ssl_certificate_key  ssl/2844030_dev.dongshanhaibao.com.key;
                ssl_session_cache    shared:SSL:5m;
                ssl_session_timeout  25m;
    
                ssl_ciphers  HIGH:!aNULL:!MD5;
                ssl_prefer_server_ciphers  on;
    
                location / {
                       # root   html;
                       # index  index.html index.htm;
                 proxy_pass http://localhost:9002/;
                         proxy_set_header  Host  $http_host;
                    
            }
            location /www1{    
                      alias /usr/share/nginx/html;
                      index index.html index.php index.htm;
              }
              location /www2{
                      alias /usr/share/nginx/dist;
                      index index.html index.php index.htm;
              }
            location /group1/M00 {
                     proxy_pass http://fdfs_group1;
            }
            location /adminw {
                            proxy_pass http://localhost:9001/;
                            proxy_set_header  Host  $http_host;
                    }    
        }
    }  

  • 相关阅读:
    龙芯地址空间详解
    JS匿名函数 Amy
    JS正则表达式 Amy
    JS对象 Amy
    Java 位图法排序
    Java Final
    JAVA 数组
    Java shuffle 算法
    jQuery object and DOM element
    Javascript 声明时用“var”跟不用"var"的区别
  • 原文地址:https://www.cnblogs.com/aqicheng/p/11567161.html
Copyright © 2011-2022 走看看