1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| server { listen 80; server_name 域名; access_log /var/log/nginx/logging.access.log main; location / { auth_basic "Please input password"; auth_basic_user_file /etc/nginx/passwd.db; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://IP:8088; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
|