forked from ccorzorz/docker_alpine_tengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example
61 lines (44 loc) · 1.34 KB
/
example
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
upstream backend {
# keepalive 256;
server 10.10.0.2;
server 10.10.0.3;
server 10.10.0.4;
}
server {
listen 80;
server_name www.example.com;
location / {
rewrite ^/(.*) https://www.example.com/$1 permanent;
}
}
server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate ssl_files/example.pem;
ssl_certificate_key ssl_files/example.key;
ssl_dhparam ssl_files/dhparam2048.pem;
ssl_session_cache shared:SSL:100m;
ssl_session_timeout 5m;
ssl_session_tickets on;
ssl_session_ticket_key ssl_files/session_ticket.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://backend;
include proxy_params;
}
location ^~ /api/ {
# location ~* ^/(api|task)/ {
# rewrite ^/(api|task)/(.+)$ /$2 break;
# proxy_pass http://api;
proxy_pass http://api/;
include proxy_params;
}
location ^~ /task/ {
proxy_pass http://api;
include proxy_params;
}
access_log /usr/local/nginx/logs/www.example.com_access_ssl.log main;
error_log /usr/local/nginx/logs/www.example.com_error_ssl.log;
}