worker_processes 10;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
events {
worker_connections 1024;
}
# http conf
http {
#include http/common.conf;
#include http/cache.conf;
#include http/resty.conf;
#include http/mime.types;
include http/*.conf;
include http/servers/*.conf;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$request_filename"';
access_log logs/access.log main;
#charset koi8-r;
#access_log logs/host.access.log main;
server{
listen 8090;
server_name localhost;
#ssl on;
#从腾讯云获取到的第一个文件的全路径
#ssl_certificate /etc/ssl/server.pem;
#ssl_certificate_key /etc/ssl/server.key;
location /backoffice {
gzip on;
root /var/www/html;
index index.html index.htm;
if ($request_filename ~ .*\.(js|css|htm|html)$)
{
expires -1;
}
}
}
}
nginx gzip
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章