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;
}
}
原文地址:https://www.jb51.cc/wenti/3282863.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。