-
Notifications
You must be signed in to change notification settings - Fork 10
/
nginx.conf
70 lines (66 loc) · 1.82 KB
/
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
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
# dont serve traffic from the www subdomain
server {
listen 80;
server_name www.fbrell.com;
access_log /data/log/www.fbrell.access;
location / {
rewrite (.*) http://fbrell.com$1 permanent;
}
}
server {
listen 80;
server_name dev.fbrell.com;
charset utf-8;
access_log /data/log/dev.fbrell.access;
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|txt|js|htm|html)$ {
root /data/www/fbrell/public;
}
location / {
proxy_pass http://localhost:43700;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-Host $host;
}
}
server {
listen 80;
server_name fbrell.com;
charset utf-8;
access_log /data/log/fbrell.access;
location ~* ^.+.(htm|html)$ {
root /data/www/fbrell/public;
}
location ~* ^.+.(css|js|jpg|jpeg|gif|png|ico|txt)$ {
root /data/www/fbrell/public;
expires 120h;
}
location / {
proxy_pass http://localhost:43600;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-Host $host;
}
}
server {
listen 443;
server_name fbrell.com;
ssl on;
ssl_certificate /data/www/fbrell/etc/combo-cert.pem;
ssl_certificate_key /data/www/fbrell/etc/decrypted.ssl.key;
charset utf-8;
access_log /data/log/ssl.fbrell.access;
location ~* ^.+.(css|js|htm|html)$ {
root /data/www/fbrell/public;
}
location ~* ^.+.(jpg|jpeg|gif|png|ico|txt)$ {
root /data/www/fbrell/public;
expires 120h;
}
location / {
proxy_pass http://localhost:43600;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
}
}
# vim:set ft=nginx: