Skip to content
This repository was archived by the owner on Aug 10, 2020. It is now read-only.

Commit 640a644

Browse files
author
gau1991
committed
Made compatible with EasyEngine core config
1 parent d033fa2 commit 640a644

File tree

2 files changed

+55
-11
lines changed

2 files changed

+55
-11
lines changed

nginx/debian/conf/nginx.conf

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,45 @@ events {
88
}
99

1010
http {
11-
1211
##
13-
# Basic Settings
12+
# EasyEngine Settings
1413
##
15-
1614
sendfile on;
1715
tcp_nopush on;
1816
tcp_nodelay on;
1917
keepalive_timeout 65;
2018
types_hash_max_size 2048;
21-
# server_tokens off;
2219

20+
server_tokens off;
21+
reset_timedout_connection on;
22+
add_header X-Powered-By "EasyEngine";
23+
add_header rt-Fastcgi-Cache $upstream_cache_status;
24+
25+
# Limit Request
26+
limit_req_status 403;
27+
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
28+
29+
# Proxy Settings
30+
# set_real_ip_from proxy-server-ip;
31+
# real_ip_header X-Forwarded-For;
32+
33+
fastcgi_read_timeout 300;
34+
client_max_body_size 100m;
35+
36+
# SSL Settings
37+
ssl_session_cache shared:SSL:20m;
38+
ssl_session_timeout 10m;
39+
ssl_prefer_server_ciphers on;
40+
ssl_ciphers HIGH:!aNULL:!MD5:!kEDH;
41+
42+
# Log format Settings
43+
log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
44+
'$http_host "$request" $status $body_bytes_sent '
45+
'"$http_referer" "$http_user_agent"';
46+
47+
##
48+
# Basic Settings
49+
##
2350
# server_names_hash_bucket_size 64;
2451
# server_name_in_redirect off;
2552

@@ -40,12 +67,29 @@ http {
4067
gzip on;
4168
gzip_disable "msie6";
4269

43-
# gzip_vary on;
44-
# gzip_proxied any;
45-
# gzip_comp_level 6;
46-
# gzip_buffers 16 8k;
47-
# gzip_http_version 1.1;
48-
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
70+
gzip_vary on;
71+
gzip_proxied any;
72+
gzip_comp_level 6;
73+
gzip_buffers 16 8k;
74+
gzip_http_version 1.1;
75+
gzip_types
76+
application/atom+xml
77+
application/javascript
78+
application/json
79+
application/rss+xml
80+
application/vnd.ms-fontobject
81+
application/x-font-ttf
82+
application/x-web-app-manifest+json
83+
application/xhtml+xml
84+
application/xml
85+
font/opentype
86+
image/svg+xml
87+
image/x-icon
88+
text/css
89+
text/plain
90+
text/x-component
91+
text/xml
92+
text/javascript;
4993

5094
##
5195
# Virtual Host Configs

nginx/debian/nginx-common.nginx.logrotate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/var/log/nginx/*.log {
2-
weekly
2+
size 10M
33
missingok
44
rotate 52
55
compress

0 commit comments

Comments
 (0)