41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
# AIOS primary public Casdoor entry for cnnetmkt.top.
|
|
# The upstream remains the existing backup/home Casdoor service; public clients should see auth.cnnetmkt.top only.
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name auth.cnnetmkt.top;
|
|
|
|
access_log /var/log/nginx/aios-auth-cnnetmkt.access.log;
|
|
error_log /var/log/nginx/aios-auth-cnnetmkt.error.log;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/cnnetmkt-wildcard/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/cnnetmkt-wildcard/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
proxy_pass https://auth.h.imruyi.top:8443;
|
|
proxy_http_version 1.1;
|
|
proxy_ssl_server_name on;
|
|
proxy_ssl_name auth.h.imruyi.top;
|
|
proxy_ssl_verify off;
|
|
proxy_set_header Host auth.h.imruyi.top;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_redirect https://auth.h.imruyi.top:8443/ https://auth.cnnetmkt.top/;
|
|
proxy_redirect https://auth.h.imruyi.top/ https://auth.cnnetmkt.top/;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name auth.cnnetmkt.top;
|
|
return 301 https://$host$request_uri;
|
|
}
|