Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Docker Nginx Auto Ssl
Commits
35cd6994
Commit
35cd6994
authored
Nov 11, 2019
by
Valian
Browse files
moved gzip configuration to separate snippet
parent
d7530407
Changes
3
Show whitespace changes
Inline
Side-by-side
nginx.conf
View file @
35cd6994
...
@@ -7,15 +7,20 @@ events {
...
@@ -7,15 +7,20 @@ events {
}
}
http
{
http
{
include
mime.types
;
include
mime.types
;
default_type
application/octet-stream
;
default_type
application/octet-stream
;
sendfile
on
;
sendfile
on
;
tcp_nopush
on
;
tcp_nopush
on
;
tcp_nodelay
on
;
tcp_nodelay
on
;
server_tokens
off
;
server_tokens
off
;
# reasonable default, as 1MB is almost always not enough
client_max_body_size
100M
;
client_max_body_size
100M
;
# enable gzip support
include
server-gzip.conf
;
# auto-ssl lua magic for automatic generation of certs
include
resty-http.conf
;
include
resty-http.conf
;
server
{
server
{
...
...
snippets/server-gzip.conf
0 → 100644
View file @
35cd6994
gzip
on
;
gzip_disable
"msie6"
;
gzip_vary
on
;
gzip_proxied
any
;
gzip_comp_level
6
;
gzip_buffers
16
8
k
;
gzip_http_version
1
.
1
;
gzip_types
application
/
javascript
application
/
rss
+
xml
application
/
vnd
.
ms
-
fontobject
application
/
x
-
font
application
/
x
-
font
-
opentype
application
/
x
-
font
-
otf
application
/
x
-
font
-
truetype
application
/
x
-
font
-
ttf
application
/
x
-
javascript
application
/
xhtml
+
xml
application
/
xml
font
/
opentype
font
/
otf
font
/
ttf
image
/
svg
+
xml
image
/
x
-
icon
text
/
css
text
/
javascript
text
/
plain
text
/
xml
;
\ No newline at end of file
snippets/server-proxy.conf
View file @
35cd6994
...
@@ -23,36 +23,5 @@ server {
...
@@ -23,36 +23,5 @@ server {
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
proxy_cache_bypass
$
http_upgrade
;
proxy_cache_bypass
$
http_upgrade
;
client_max_body_size
100
M
;
gzip
on
;
gzip_disable
"msie6"
;
gzip_vary
on
;
gzip_proxied
any
;
gzip_comp_level
6
;
gzip_buffers
16
8
k
;
gzip_http_version
1
.
1
;
gzip_types
application
/
javascript
application
/
rss
+
xml
application
/
vnd
.
ms
-
fontobject
application
/
x
-
font
application
/
x
-
font
-
opentype
application
/
x
-
font
-
otf
application
/
x
-
font
-
truetype
application
/
x
-
font
-
ttf
application
/
x
-
javascript
application
/
xhtml
+
xml
application
/
xml
font
/
opentype
font
/
otf
font
/
ttf
image
/
svg
+
xml
image
/
x
-
icon
text
/
css
text
/
javascript
text
/
plain
text
/
xml
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment