Ryan Wang 🚀
server {
listen *:80 default_server;
listen [::]:80 default_server;
server_name tanjiaming99.com www.tanjiaming99.com;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name tanjiaming99.com www.tanjiaming99.com;
root /usr/share/nginx/html;
ssl_certificate "/etc/pki/nginx/cert.crt";
ssl_certificate_key "/etc/pki/nginx/private/cert.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
include /etc/nginx/default.d/*.conf;
if ( $host = "www.tanjiaming99.com" ) {
rewrite ^/(.*)$ $scheme://tanjiaming99.com/$1 permanent;
}
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8090/;
}
error_page 404 /404.html;
location = /40x.html {
}
location = /50x.html {
}
}