【发布时间】:2016-05-08 18:47:53
【问题描述】:
我正在使用 nginx 作为烧瓶应用程序的反向代理 Web 服务器。这是我的配置文件:
server {
access_log /var/log/nginx.log main;
error_log /var/log/nginx_err.log warn;
location / {
proxy_cache_revalidate on;
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
当我转到服务器的根目录时,例如www.myserver.com(nginx 正在监听 80 端口),chrome 总是使用缓存来获取 index.html 文件。查看 nginx 日志,GET / 根本没有记录,我的 Web 应用程序 (python-flask) 甚至没有收到请求。
当转到 www.myserver.com/#/ 时,请求确实通过了。
知道是什么导致了这个问题以及如何防止这种情况发生吗?
【问题讨论】: