-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
95 lines (76 loc) · 2.56 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 512;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - [$time_iso8601] "$request" $status';
access_log /dev/stdout;
error_log /dev/stderr warn;
sendfile on;
server {
listen 80;
listen 443 ssl;
server_name dagrev.is;
root /srv/daGrev.is;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/letsencrypt/live/dagrev.is/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dagrev.is/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/dagrev.is/chain.pem;
location /.well-known/ {
alias /data/letsencrypt/.well-known/;
try_files $uri $uri/ /404/index.html;
}
location ~ ^/[Dd]otfiles$ {
return https://github.com/daGrevis/Dotfiles;
}
location ~ ^/(init\.vim)|(\.?vimrc)$ {
return https://github.com/daGrevis/Dotfiles/raw/master/neovim/.config/nvim/init.vim;
}
location ~ ^/developerslv/up(load)?$ {
return 301 http://t.me/zn_devlv_bot;
}
location /msks {
alias /srv/msks/;
try_files $uri $uri/ @msks-proxy;
}
location @msks-proxy {
rewrite /msks/?(.*) /$1 break;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Client-App 'msks';
proxy_pass http://msks:3001;
}
location /developerslv {
alias /srv/developerslv/;
try_files $uri $uri/ @developerslv-proxy;
}
location @developerslv-proxy {
rewrite /developerslv/?(.*) /$1 break;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Client-App 'developerslv';
proxy_pass http://msks:3001;
}
location / {
index index.html;
try_files $uri $uri/ /404/index.html;
}
}
server {
listen 80;
server_name dagrevis.lv;
location / {
return 301 https://dagrev.is/;
}
}
}