Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
傅伟强-富德
/
test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bc34da4e
authored
Mar 13, 2019
by
傅伟强-富德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update nginx
1 parent
65d71ce3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
nginx
nginx
View file @
bc34da4
#user nobody;
worker_processes 1;
...
...
@@ -44,6 +43,23 @@ http {
# }
#}
#开启gzip
gzip on;
#低于1kb的资源不压缩
gzip_min_length 1k;
#压缩级别【1-9】,越大压缩率越高,同时消耗cpu资源也越多,建议设置在4左右
gzip_comp_level 4;
#需要压缩哪些响应类型的资源,多个空格隔开
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css application/json image/jpeg image/gif image/png;
#配置禁用gzip条件,支持正则。此处表示ie6及以下不启用gzip(因为ie低版本不支持)
gzip_disable "MSIE [1-6]\.";
#是否添加“Vary: Accept-Encoding”响应头
gzip_vary on;
#上传文件大小设置
client_max_body_size 1024M;
upstream gateway
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment