Skip to content

Commit 934dc3f

Browse files
committed
#16: host old logs directly on our server
1 parent 94da3c3 commit 934dc3f

1 file changed

Lines changed: 32 additions & 28 deletions

File tree

  • ctor/etc/nginx/sites-available
Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
server {
2-
listen 443 ssl;
3-
server_name codingteam.org.ru;
4-
keepalive_timeout 60;
5-
ssl_certificate /etc/letsencrypt/live/loglist.net/fullchain.pem;
6-
ssl_certificate_key /etc/letsencrypt/live/loglist.net/privkey.pem;
7-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
8-
ssl_ciphers "HIGH:!aNULL:!MD5:!kEDH";
9-
add_header Strict-Transport-Security 'max-age=15552000';
2+
listen 443 ssl;
3+
server_name codingteam.org.ru;
4+
keepalive_timeout 60;
5+
ssl_certificate /etc/letsencrypt/live/loglist.net/fullchain.pem;
6+
ssl_certificate_key /etc/letsencrypt/live/loglist.net/privkey.pem;
7+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
8+
ssl_ciphers "HIGH:!aNULL:!MD5:!kEDH";
9+
add_header Strict-Transport-Security 'max-age=15552000';
1010

11-
location /_logs/ {
12-
proxy_set_header X-Forwarded-Host $host;
13-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14-
proxy_set_header X-Forwarded-Proto $scheme;
15-
proxy_http_version 1.1;
16-
proxy_pass https://chatlogs.jabber.ru/;
17-
}
11+
location /_logs/ {
12+
proxy_set_header X-Forwarded-Host $host;
13+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14+
proxy_set_header X-Forwarded-Proto $scheme;
15+
proxy_http_version 1.1;
16+
proxy_pass https://chatlogs.jabber.ru/;
17+
}
1818

19+
location /old-logs/ {
20+
alias /opt/codingteam/old-logs/;
21+
index index.html;
22+
}
1923

20-
location / {
21-
proxy_set_header X-Forwarded-Host $host;
22-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23-
proxy_set_header X-Forwarded-Proto $scheme;
24-
proxy_set_header Host codingteam.org.ru;
25-
proxy_http_version 1.1;
26-
proxy_pass http://localhost:5000/;
27-
}
24+
location / {
25+
proxy_set_header X-Forwarded-Host $host;
26+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
27+
proxy_set_header X-Forwarded-Proto $scheme;
28+
proxy_set_header Host codingteam.org.ru;
29+
proxy_http_version 1.1;
30+
proxy_pass http://localhost:5000/;
31+
}
2832
}
2933

3034
server {
31-
listen 80;
32-
server_name codingteam.org.ru;
35+
listen 80;
36+
server_name codingteam.org.ru;
3337

34-
location / {
35-
rewrite ^(.*)$ https://codingteam.org.ru$1 permanent;
36-
}
38+
location / {
39+
rewrite ^(.*)$ https://codingteam.org.ru$1 permanent;
40+
}
3741
}

0 commit comments

Comments
 (0)