This repository has been archived by the owner on Jan 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
53 lines (42 loc) · 1.49 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
upstream websocket {
server 127.0.0.1:3011;
}
server {
listen 443 default ssl;
server_name visiteasttroy.com;
keepalive_timeout 3;
add_header X-Frame-Options SAMEORIGIN;
# http://nginx.org/en/docs/http/configuring_https_servers.html
ssl_certificate /etc/letsencrypt/live/visiteasttroy.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/visiteasttroy.com/privkey.pem;
# Enables or disables the automatic directory listing.
autoindex off;
access_log /var/log/nginx/visiteasttroy.com_access.log;
error_log /var/log/nginx/visiteasttroy.com_error.log notice;
root /home/ubuntu/lights/build;
# Static media. CSS, JavaScript, UI images.
location ^~ /static {
# alias /home/ubuntu/lights/build/static/;
gzip on;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript font/ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_proxied any;
gzip_disable "msie6";
}
location /socket.io {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
if (!-f $request_filename) {
proxy_pass http://websocket;
break;
}
}
}
server {
listen 80;
server_name .visiteasttroy.com;
rewrite ^(.*) https://visiteasttroy.com$1 permanent;
access_log off;
}