![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Nginx
2号自信
这个作者很懒,什么都没留下…
展开
-
nginx 解决options跨域问题
server { #listen 9201; listen 8014; server_name localhost; root C:/wnmp/Nginx/html; charset utf-8; #access_log logs/hvideo.access.log main; acces...原创 2019-01-26 12:07:16 · 8077 阅读 · 2 评论 -
nignx反向代理后获取不到域名或外网ip
在项目中遇到在访问域名、外网ip时。通过$_SERVER['HTTP_HOST']总是获取到内网ip,开始以为是处于局域网下访问,路由问题。后发现是nginx转发的问题:在nginx配置文件中增加:proxy_set_header Host $host; 就可以解决。如果有两层转发,两个nginx配置文件都需要增加这句话。 location /resPlatform/ {...原创 2019-08-17 11:28:34 · 1503 阅读 · 0 评论