-
Notifications
You must be signed in to change notification settings - Fork 1
/
.nginx.conf.example
42 lines (34 loc) · 1020 Bytes
/
.nginx.conf.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
upstream app {
server unix:/home/kkubby/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen [::]:443 ssl http2 ipv6only=on;
listen 443 ssl http2;
listen 80;
root /home/kkubby/current/public;
server_name kkubby.com;
index index.htm index.html;
ssl on;
ssl_certificate /etc/nginx/ssl/ssl.pem; # EXAMPLES TO BE REPLACED
ssl_certificate_key /etc/nginx/ssl/server.key;
try_files $uri/index.html $uri @app;
location ^~ /(assets|packs|favicon.ico)/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
location ~* \.(css|js)$ {
expires 365d;
gzip_static on;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app;
proxy_set_header X-Forwarded-Proto https;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}