nginx https代理调试丨技术开发分享录

nginx https代理调试

{{ detail.nickname }}

转载 翻译 {{ formatTime(detail.create_time) }} 字数 {{ detail.content && detail.content.length }} 阅读 {{ detail.read_num }} {{ formatTag(v) }}

"代理配置\n\n```nginx\nlocation / {\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header Host $host;\n    proxy_pass https://10.128.34.58:1234;\n}\n```\n\n查看nginx配置是否成功\n\n```shell\n# /usr/loca/nginx/sbin/nginx -t\n```\n\n重启nginx\n\n```shell\n# /usr/loca/nginx/sbin/nginx -s reload\n```\n\n查看nginx报错日志\n\n```\n# tail -f /usr/local/nginx/logs/error.log\n```\n\n查看nginx配置是否生效(主要观察时间)\n\n```shell\n# ps -ef |grep nginx\n```\n\n查看curl信息\n\n```shell\n# curl -k -I https://aaa.com/api/token\n```\n\n代理成功后通过浏览器访问看下结果"
PS:写作不易,如要转裁,请标明转载出处。

如果此篇对您有帮助,可小额赞助,以兹鼓励!

猜你想看