主题
nginx配置说明
WARNING
接口配置nginx映射到网关
配置参考
以下是使用https协议配置
conf
upstream admin_upstream{
ip_hash;
server 127.0.0.1:8080;
server 127.0.0.2:8080;
}
server {
listen 443 ssl;
server_name admin.demo.wueasy.com;
charset utf-8;
ssl_certificate /opt/ssl/wueasy/fullchain.crt;
ssl_certificate_key /opt/ssl/wueasy/cert.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!aNULL:!MD5:!RC4:!DHE;
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
#access_log logs/access.log main;
access_log /dev/null;
error_page 404 /404.html;
location /
{
proxy_pass http://admin_upstream;
client_max_body_size 200M;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}