nginx-proxy-ai/nginx.conf

25 lines
604 B
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

events {}
http {
include /etc/nginx/conf.d/*.conf;
# SSO 登录限流:按真实客户端 IPX-Forwarded-For每分钟 5 次burst 3
limit_req_zone $http_x_forwarded_for zone=sso_login:10m rate=5r/m;
# 所有 HTTP 自动跳 HTTPS
server {
listen 80 default_server;
server_name _;
location / {
return 301 https://$host$request_uri;
}
# 让证书续期正常工作(必须留)
location /.well-known/acme-challenge/ {
root /var/www/html;
try_files $uri =404;
}
}
}