-
Notifications
You must be signed in to change notification settings - Fork 7
/
example_nginx.conf
35 lines (30 loc) · 1.01 KB
/
example_nginx.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
worker_processes 4;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name domain.com;
error_log /var/log/nginx/error.log;
rewrite ^ https://$server_name$request_uri;
}
server {
listen 443 ssl default_server;
server_name domain.com;
keepalive_timeout 70;
access_log /var/log/nginx/ssl-access.log;
error_log /var/log/nginx/ssl-error.log debug;
ssl_certificate ssl/domain.com.crt; #the ssl folder is now in /usr/local
ssl_certificate_key ssl/domain.com.key;
ssl_session_cache shared:SSL_domain:10m;
ssl_session_timeout 120m; #extend the life of the SSL session, for this defines the timeout of the application session.
location / {
proxy_pass https://backend.domain.com;
session_binding_proxy $s_session_id;
session_binding_proxy_key DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF; #optional. A random key is generated if not specified.
sub_filter https://backend.domain.com https://domain.com;
sub_filter_once off;
}
}
}