-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
48 lines (41 loc) · 1.18 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
http {
include mime.types;
default_type application/octet-stream;
gzip on;
keepalive_timeout 600;
sendfile on;
server_tokens off;
server_names_hash_bucket_size 64;
# HTTP: Redirect everybody to https
server {
listen 80;
server_name ~^servername.tld;
location / {
return 301 https://servername.tld$request_uri;
}
}
server {
listen 443 ssl;
server_name servername.tld;
ssl_certificate /etc/ssl/private/servername.crt;
ssl_certificate_key /etc/ssl/private/servername.key;
location /css {
alias /www/public/css;
}
location /html {
alias /www/public/html;
}
location /js {
alias /www/public/js;
}
location /x {
proxy_pass http://127.0.0.1:1313;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_header Server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}