是否可以只允许用户输入 xxxxxx.com(虚构),因此他们应该进行 DNS 查找并连接。并阻止使用我的公共 IP 进行连接的用户?
\n\n配置:
\n\nserver {\nlisten 80;\nreturn 301 https://$host$request_uri;\n}\n\nserver {\n\nlisten 443;\nserver_name xxxxxxx.com;\n\nssl_certificate /etc/nginx/ssl/server.crt;\nssl_certificate_key /etc/nginx/ssl/server.key;\n\nssl on;\nssl_session_cache builtin:1000 shared:SSL:10m;\nssl_protocols TLSv1 TLSv1.1 TLSv1.2;\nssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;\nssl_prefer_server_ciphers on;\n\naccess_log /var/log/nginx/jenkins.access.log;\n\nlocation / {\n\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n\n # Fix the \xe2\x80\x9cIt appears that your reverse proxy set up is broken" error.\n proxy_pass http://10.0.11.32:80;\n proxy_read_tenter code hereimeout 360;\n\n proxy_redirect http://10.0.11.32:80 https://xxxxxxx.com;\n}\n}\nRun Code Online (Sandbox Code Playgroud)\n