nginx配置

user root;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server_names_hash_max_size 512;
    server_names_hash_bucket_size 128;


    server {
        listen       80;
        server_name  archives.****.cn;
        location /loadlimit {
            return 503;
        }    
        location /swaplimit {
            return 503;
        }
        location / { 
            proxy_pass http://127.0.0.1:8087/;
        } 
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    server {
        listen       80;
        server_name  hhmes.****.cn;
        location / {
            client_max_body_size 100m;
            root /application/hhmes-web;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html; # vue页面刷新重定向,否则页面刷新404
        }
        # 配置跨域代理
        location /ifc {
            client_max_body_size 100m;
            rewrite ^/ifc/(.*)$ /$1 break;
            proxy_pass http://127.0.0.1:8085;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_read_timeout 300;
            proxy_send_timeout 300;
        }
        # 配置文件目录
        location /downloadorderfile {
            alias /application/upfiles/hhmes/saleOrder;
            sendfile on;   #开启高效文件传输模式
            autoindex on; #启用目录流量
            autoindex_localtime on; #显示文件时间为GMT时间
            autoindex_exact_size on; #显示文件的大小,单位是kB或者MB或者GB
            charset utf-8,gbk;  #避免中文乱码
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    #http跳转到https
    #server {
    #    listen 80;
    #    server_name  bpm.****.cn;
    #    rewrite ^(.*) https://$server_name$1 permanent;
    #}
    server {
        listen 80;
        server_name bpm.****.cn;
        return 301 https://$http_host$request_uri;
        access_log  off;
    }
}
 

相关文章

显卡天梯图2024最新版,显卡是电脑进行图形处理的重要设备,...
初始化电脑时出现问题怎么办,可以使用win系统的安装介质,连...
todesk远程开机怎么设置,两台电脑要在同一局域网内,然后需...
油猴谷歌插件怎么安装,可以通过谷歌应用商店进行安装,需要...
虚拟内存这个名词想必很多人都听说过,我们在使用电脑的时候...