You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
402 lines
14 KiB
402 lines
14 KiB
|
|
#user nobody;
|
|
worker_processes 1;
|
|
|
|
#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;
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
server_tokens off;
|
|
client_max_body_size 50M;
|
|
|
|
# 定义后端集群
|
|
upstream java_cluster {
|
|
server 10.76.108.1:85;
|
|
# server 10.76.108.4:85;
|
|
# server 10.76.108.5:85;
|
|
# server 10.76.108.6:85;
|
|
# 可加 weight、backup、max_fails 等参数
|
|
}
|
|
|
|
#allow 61.144.226.33;
|
|
#allow 10.76.108.25;
|
|
#allow 192.168.93.1;
|
|
#deny all;
|
|
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
# '$status $body_bytes_sent "$http_referer" '
|
|
# '"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
#access_log logs/access.log main;
|
|
|
|
sendfile on;
|
|
#tcp_nopush on;
|
|
|
|
#keepalive_timeout 0;
|
|
keepalive_timeout 65;
|
|
|
|
#gzip on;
|
|
|
|
server {
|
|
listen 81;
|
|
|
|
location / {
|
|
proxy_pass http://10.76.108.1:80;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
|
|
# 企业端应用代理至 14 号服务器
|
|
server {
|
|
listen 12001;
|
|
|
|
location / {
|
|
proxy_pass http://10.76.108.14:12001;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
client_max_body_size 200M;
|
|
#charset koi8-r;
|
|
|
|
#access_log logs/host.access.log main;
|
|
#prpoxy_cookie_path / "/; httponly;secure; SameSite=Lax";
|
|
location / {
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
#proxy_headers_hash_max_size 51200;
|
|
#1proxy_headers_hash_bucket_size 6400;
|
|
#proxy_set_header X-Real-IP $remote_addr;
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
root /usr/local/nginx/html/HTML-ICP/;
|
|
# root /usr/local/nginx/html/dist-zf/;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
location /icp {
|
|
alias /usr/local/nginx/html/HTML-ICP/;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
location /efcode20-ent-app/ {
|
|
proxy_pass http://10.76.108.14:12001/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
location /efcode20-enf-app/ {
|
|
proxy_pass http://10.76.108.14:12003/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
# location /efcode20-sup-web/ {
|
|
# proxy_pass http://10.76.108.15:12004/;
|
|
# proxy_set_header Host $http_host;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# }
|
|
# location ^~ /nacos-console/ {
|
|
# proxy_pass http://10.76.108.11:8080/nacos-console/;
|
|
# proxy_set_header Host $host:$server_port;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
# }
|
|
#location ~* /(uploads|images)/.*\.(php|php2|php3|php4|php5|phpm|phpml|phtml|phtm|phps|pht|asp|aspx|asa|cer|cdx|ashx|exe|sh|bash|jsp|jspx|jspa|html|web.config|cfm|cgi|war|ashx|htaccess|py|pl)$ {
|
|
#deny all; # 拦截.html和.htm文件,并返回403禁止访问
|
|
#return 403;
|
|
#}
|
|
location /enforce {
|
|
# 执法端
|
|
alias /usr/local/nginx_new/html/dist-zf/;
|
|
#root /usr/local/nginx/html/zfjdm/;
|
|
try_files $uri $uri/ /enforce/index.html;
|
|
}
|
|
location /enterprise {
|
|
# 企业端
|
|
#proxy_set_header X-Real-IP $remote_addr;
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# 注意这里只能使用 alias
|
|
alias /usr/local/nginx/html/dist-qy/;
|
|
# root /usr/local/nginx/html/st-screen;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
location /enforcetest {
|
|
# 执法端 - 测试
|
|
alias /usr/local/nginx/html/dist-qy-test/;
|
|
index index.html index.htm;
|
|
}
|
|
location /enterprisetest {
|
|
# 企业端 - 测试 (注意这里只能使用 alias)
|
|
alias /usr/local/nginx/html/dist-qy-test/;
|
|
# root /usr/local/nginx/html/st-screen;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
#proxy_cookie_path / "/; httponly;secure; SameSite=Lax";
|
|
#location / {
|
|
# proxy_cookie_path / "/api; secure; SameSite=None";
|
|
# proxy_pass http://10.76.108.1:85;
|
|
#}
|
|
#error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root html;
|
|
}
|
|
location /siqApi {
|
|
proxy_pass https://egbpub.szsiq.com/egb/api/thirdauth;
|
|
# proxy_pass http://10.76.108.3/siqApi;
|
|
}
|
|
location ^~ /sjWeb/ {
|
|
proxy_pass http://www.szcredit.com.cn/web/GSZJGSPT/;
|
|
#proxy_pass http://10.76.108.3/siqApi;
|
|
}
|
|
location /GJQYCredit {
|
|
proxy_pass http://www.szcredit.com.cn/web/GSZJGSPT/;
|
|
}
|
|
location /mssqApi {
|
|
proxy_pass http://10.224.158.64:8282/proxy;
|
|
}
|
|
location /profile/ {
|
|
proxy_pass http://10.76.108.1:85/profile/;
|
|
}
|
|
|
|
location /szszfjdm {
|
|
alias /usr/local/nginx/html/zfjdm/;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
#执法监督码后台接口地址
|
|
location ^~ /jdmApi/ {
|
|
# proxy_pass http://10.76.108.1:85/;
|
|
proxy_pass http://java_cluster/;
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
proxy_pass_header Set-Cookie;
|
|
#proxy_set_header Host $host;
|
|
#proxy_set_header X-Real-IP $remote_addr;
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
#proxy_headers_hash_max_size 51200;
|
|
#proxy_headers_hash_bucket_size 6400;
|
|
#proxy_intercept_errors on;
|
|
#error_page 301 302 307 = @handle_redirects;
|
|
#client_max_body_size 5120m;
|
|
}
|
|
# 执法监督码后台测试接口地址
|
|
location ^~ /jdmTestApi/ {
|
|
proxy_pass http://10.76.108.1:88/;
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
proxy_pass_header Set-Cookie;
|
|
|
|
proxy_intercept_errors on;
|
|
error_page 301 302 307 = @handle_redirects;
|
|
client_max_body_size 5120m;
|
|
}
|
|
location @handle_redirects {
|
|
set $saved_redirect_location '$upstream_http_location';
|
|
proxy_pass $saved_redirect_location;
|
|
}
|
|
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
#location ~ \.php$ {
|
|
# proxy_pass http://127.0.0.1;
|
|
#}
|
|
|
|
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
#
|
|
#location ~ \.php$ {
|
|
# root / html;
|
|
# fastcgi_pass 127.0.0.1:9000;
|
|
# fastcgi_index index.php;
|
|
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
# include fastcgi_params;
|
|
#}
|
|
|
|
# deny access to .htaccess files, if Apache's document root
|
|
# concurs with nginx's one
|
|
#
|
|
#location ~ /\.ht {
|
|
# deny all;
|
|
#}
|
|
}
|
|
|
|
server {
|
|
listen 8087;
|
|
server_name localhost;
|
|
#proxy_cookie_path / "/; httponly;secure; SameSite=Lax";
|
|
location / {
|
|
proxy_pass http://10.224.158.64:8282/;
|
|
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header REMOTE-HOST $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
client_max_body_size 50m;
|
|
client_body_buffer_size 256k;
|
|
proxy_connect_timeout 100;
|
|
proxy_send_timeout 100;
|
|
proxy_read_timeout 100;
|
|
proxy_buffer_size 256k;
|
|
proxy_buffers 4 256k;
|
|
proxy_busy_buffers_size 256k;
|
|
proxy_temp_file_write_size 256k;
|
|
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
|
|
proxy_max_temp_file_size 128m;
|
|
}
|
|
}
|
|
server {
|
|
listen 85;
|
|
server_name localhost;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
client_max_body_size 100M;
|
|
location / {
|
|
# proxy_pass http://10.76.108.1:85;
|
|
proxy_pass http://java_cluster/;
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header REMOTE-HOST $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_redirect default;
|
|
proxy_connect_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
|
|
location /efcode20-sup-web/ {
|
|
proxy_pass http://10.76.108.15:12004/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
# server {
|
|
# listen 85 ssl;
|
|
# server_name localhost;
|
|
#
|
|
# ssl_certificate /efcode20/ssl/selfsigned.crt;
|
|
# ssl_certificate_key /efcode20/ssl/selfsigned.key;
|
|
# ssl_protocols TLSv1.2 TLSv1.3;
|
|
#
|
|
# proxy_set_header Host $host;
|
|
# proxy_set_header X-real-ip $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# client_max_body_size 100M;
|
|
#
|
|
# location / {
|
|
# proxy_pass http://java_cluster/;
|
|
# proxy_set_header Host $host:$server_port;
|
|
# proxy_set_header REMOTE-HOST $remote_addr;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# proxy_redirect default;
|
|
# proxy_connect_timeout 600s;
|
|
# proxy_send_timeout 600s;
|
|
# proxy_read_timeout 600s;
|
|
# }
|
|
#
|
|
# location /efcode20-sup-web/ {
|
|
# proxy_pass http://10.76.108.15:12004/;
|
|
# proxy_set_header Host $http_host;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# }
|
|
# }
|
|
server {
|
|
listen 88;
|
|
server_name localhost;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
client_max_body_size 100M;
|
|
location / {
|
|
proxy_pass http://10.76.108.1:81/;
|
|
}
|
|
}
|
|
|
|
# another virtual host using mix of IP-, name-, and port-based configuration
|
|
#
|
|
#server {
|
|
# listen 8000;
|
|
# listen somename:8080;
|
|
# server_name somename alias another.alias;
|
|
|
|
# location / {
|
|
# root html;
|
|
# index index.html index.htm;
|
|
# }
|
|
#}
|
|
|
|
# HTTPS server
|
|
#
|
|
server {
|
|
listen 443 ssl;
|
|
server_name jdm.szssfj.cn;
|
|
|
|
ssl_certificate /usr/local/nginx/ssl/szssfj.cn.pem;
|
|
ssl_certificate_key /usr/local/nginx/ssl/szssfj.cn.key;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384';
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
ssl_session_tickets off;
|
|
|
|
root /usr/local/nginx/html;
|
|
|
|
location /enterprisetest {
|
|
# 企业端
|
|
#proxy_set_header X-Real-IP $remote_addr;
|
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# 注意这里只能使用 alias
|
|
alias /usr/local/nginx/html/dist-qy-test/;
|
|
index index.html index.htm;
|
|
|
|
}
|
|
|
|
location /efcode20-ent-app/ {
|
|
proxy_pass http://10.76.108.14:12001/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
location /efcode20-enf-app/ {
|
|
proxy_pass http://10.76.108.14:12003/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
}
|
|
}
|
|
|