解决iframe、frame和框架丢失或获取不到session、cookies问题
原因: nginx反向代理丢失cookie的问题1. 只有host、端口变化,则cookie不会丢失。如:location /blog { proxy_pass http://127.0.0.1:9001/blog;}2. 如果路径也变化了,则需要设置cookie的路径转换如:location /proxy_path { proxy_pass http://127.0.0.1:9001/; proxy_set_header X-real-ip $remote_addr;}3. 通过浏览器访问http://127.0.
继续阅读
nginx command not found
-bash: nginx: command not found在Centos中无法在任意路径中执行nginx命令,需进入nginx目录才可以执行,解决方案是:在/etc/profile中增加nginx的执行路径的环境变量添加nginx环境变量vim /etc/profile# 增加nginx的执行文件路径# nginxexport PATH="/usr/local/nginx/sbin:$PATH"# 保存环境变量source /etc/profile验证nginx.conf配置nginx -t无痛重启nginxnginx -s reload
继续阅读