【发布时间】:2016-10-04 01:37:03
【问题描述】:
我采用了最基本的 nginx.conf 示例,并尝试在 html 文件上添加无缓存控件。尝试了我发现的所有东西,似乎没有任何效果。这是我目前的配置文件
user nobody;
worker_processes 3;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
listen [::]:80;
location / {
location ~\/.+ {
root /var/www;
index index.html index.htm;
}
location ~* \.html$ {
expires -1;
}
}
}
}
我的问题是我做错了什么是因为 nginx 还是因为其他原因?
【问题讨论】: