server {
listen 80;
listen 443 ssl;
server_name abc.com.cn;
ssl_certificate ssl_key/server.pem;
ssl_certificate_key ssl_key/server.key;
location / {
return 301 https://$host$request_uri;
}
location /backserver {
proxy_pass http://backserver;
proxy_set_header Host $Host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
add_header Cache-Control no-store;
add_header Pragma no-cache;
proxy_http_version 1.1;
proxy_set_header Connection "";
client_max_body_size 1024m;
proxy_read_timeout 7200s;
proxy_send_timeout 1800s;
proxy_connect_timeout 1800s;
}
}
upstream backserver {
sticky;
server 10.11.0.1:8080;
server 10.11.0.2:8080;
server 10.11.0.3:8080;
server 10.11.0.4:8080;
}
Server, backserver, ssl_key, Nginx