You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
user nginx;
|
|
worker_processes auto;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
load_module modules/ngx_http_js_module.so;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
js_include env.js;
|
|
include /etc/nginx/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 65;
|
|
send_timeout 600;
|
|
|
|
# 开启gzip
|
|
gzip on;
|
|
# 开启gzip_static
|
|
# gzip_static 开启后可能会报错,需要安装相应的模块, 具体安装方式可以自行查询
|
|
# 只有这个开启,vue文件打包的.gz文件才会有效果,否则不需要开启gzip进行打包
|
|
gzip_static on;
|
|
gzip_proxied any;
|
|
gzip_min_length 1k;
|
|
gzip_buffers 4 16k;
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
}
|
|
|