forked from ali5h/encipher.it
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
38 lines (31 loc) · 1.02 KB
/
Copy pathnginx.conf
File metadata and controls
38 lines (31 loc) · 1.02 KB
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
upstream encipher {
server 127.0.0.1:3000;
}
server {
server_name encipher.it www.encipher.it;
listen 443;
ssl on;
ssl_certificate /home/encipher/etc/encipher.it.crt;
ssl_certificate_key /home/encipher/etc/encipher.it.key;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
root /home/encipher/encipher;
error_log /var/log/nginx/encipher-error.log;
access_log /var/log/nginx/encipher-access.log;
rewrite ^/javascripts/inject(.+)\.js /javascripts/inject.js break;
location ~* ^/(images/.+|javascripts/.+|stylesheets/.+|.+\.(swf|txt|manifest|ico)) {
root /home/encipher/encipher/public;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://encipher;
proxy_set_header Host $http_host;
}
}
server {
server_name encipher.it www.encipher.it;
listen 80;
rewrite ^/(.*) https://encipher.it/$1 permanent;
}