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;
                    }    
        }
    }  

  • 相关阅读:
    C#时间差
    centos8安装ffmpeg
    CentOS8同步时间
    安装Supervisor
    ajax 传递 token
    .net core 3.1 中 的跨域设置
    jaeger 本地编译
    Kubernates 环境搭建
    linux : find
    Linux: 文件分割和合并
  • 原文地址:https://www.cnblogs.com/aqicheng/p/11567161.html
Copyright © 2011-2022 走看看