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.

115 lines
3.0 KiB

1 year ago
#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;
#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 3000;
#gzip on;
server {
listen 80 default_server;
listen 8443 ssl default_server;
server_name _;
ssl_certificate C:\\Users\\user01\\Documents\\bs\\nginx-1.19.1\\ssl\\scs1693214452600__.cdshell.com_server.crt;
ssl_certificate_key C:\\Users\\user01\\Documents\\bs\\nginx-1.19.1\\ssl\\scs1693214452600__.cdshell.com_server.key;
return 403;
}
server {
listen 8443 ssl;
server_name testorder.cdshell.com;
ssl_certificate C:\\Users\\user01\\Documents\\bs\\nginx-1.19.1\\ssl\\scs1693214452600__.cdshell.com_server.crt;
ssl_certificate_key C:\\Users\\user01\\Documents\\bs\\nginx-1.19.1\\ssl\\scs1693214452600__.cdshell.com_server.key;
#ssl_session_timeout 5m;
#ssl_verify_client off;
# ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
#charset koi8-r;
#access_log logs/host.access.log main;
#上传文件大小限制
client_header_buffer_size 32k;
large_client_header_buffers 4 64k;
client_max_body_size 120m;
location / {
root html;
if ($request_filename ~* .*\.(?:htm|html)$)
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
index index.html index.htm;
}
location /rh/ {
# 配置支持跨域
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
if ($request_method = 'OPTIONS') {
return 204;
}
proxy_pass http://localhost:8093/;
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_connect_timeout 3000;
proxy_send_timeout 3000;
proxy_read_timeout 3000;
}
#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;
}
}
}