随笔分类 - nginx
摘要:在 server中加入一下代码 #跨域处理 add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With,Content-Type,language; add_he
阅读全文
摘要:1、查看nginx进程 ps -ef | grep nginx 2、yum erase nginx 3、yum install -y epel-release 4、再次安装 yum install -y nginx 5、nginx -v 6、systemctl enable nginx.servic
阅读全文
摘要:location = / { return 404; }
阅读全文
摘要:只需在nginx的配置文件中的http配置项中加上 add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With; add_header Access-Contro
阅读全文
摘要:例如node的项目,可以在location中做一个验证,然后使用 porxy_pass 反向代理模块实现。 location模块的匹配介绍 1.”=”前缀指令匹配,如果匹配成功,则停止其他匹配。 2.普通字符串指令匹配,顺序是从长到短,匹配成功的location如果使用^~,则停止其他匹配(正则匹配
阅读全文

浙公网安备 33010602011771号