worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream paint {
server 127.0.0.1:14341 weight=2;
server 127.0.0.1:14342 weight=1;
server 127.0.0.1:14343 weight=1;
}
server {
listen 443 ssl;
server_name www.xxx.com xxx.com;
ssl_certificate /home/ssl/xxx.crt;
ssl_certificate_key /home/ssl/xxx.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://paint;
}
}
server {
listen 80;
server_name www.xxx.com xxx.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
}