0
我是nginx的新手,所以很抱歉如果这个问题之前已经被问过了。在nginx上启用CACHE,CentOS 7
我想在nginx上启用缓存。我发现解决方案NGINX Cache
问题是我在/etc/nginx/ngin.conf
找到的nginx.conf看起来不像是贴在那里的东西。所以我有点困惑,不知道该怎么做。
这里是我的nginx.conf
#user nginx;
worker_processes 1;
#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
#pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server_tokens off;
include /etc/nginx/conf.d/*.conf;
}
所以我应该怎么申请我已经找到了解决方案,或者我应该做点别的?
请帮
感谢您的回答,我已经在那里为gzip创建了一个文件,我是否需要为缓存创建另一个文件?如果我这样做,那么我需要输入什么文件? – AlexB
感谢您的支持,请尝试在几分钟后回到这里 – AlexB