-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx_ssl.conf
104 lines (95 loc) · 2.78 KB
/
nginx_ssl.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
}
http {
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
index index.html index.htm;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost;
client_max_body_size 900M;
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_min_length 10240;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json;
gzip_disable "MSIE [1-6]\.";
root /var/www/html;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.socket;
}
location ~* ^.+\.(?:ico|css|js|gif|jpe?g|png)$ {
expires 1y;
add_header Pragma public;
add_header Cache-Control "public";
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.socket;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mesa.mosla.de;
client_max_body_size 900M;
server_tokens off;
ssl_certificate /root/.acme.sh/mesa.mosla.de/mesa.mosla.de.cer;
ssl_certificate_key /root/.acme.sh/mesa.mosla.de/mesa.mosla.de.key;
ssl_buffer_size 8k;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
ssl_ecdh_curve secp384r1;
ssl_session_tickets off;
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8;
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_min_length 10240;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json;
gzip_disable "MSIE [1-6]\.";
root /var/www/html;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.socket;
}
location ~* ^.+\.(?:ico|css|js|gif|jpe?g|png)$ {
expires 1y;
add_header Pragma public;
add_header Cache-Control "public";
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.socket;
}
}
}