Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#16: host old logs directly on our server #20

Merged
merged 1 commit into from
Dec 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 32 additions & 28 deletions ctor/etc/nginx/sites-available/default
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
server {
listen 443 ssl;
server_name codingteam.org.ru;
keepalive_timeout 60;
ssl_certificate /etc/letsencrypt/live/loglist.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/loglist.net/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5:!kEDH";
add_header Strict-Transport-Security 'max-age=15552000';
listen 443 ssl;
server_name codingteam.org.ru;
keepalive_timeout 60;
ssl_certificate /etc/letsencrypt/live/loglist.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/loglist.net/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5:!kEDH";
add_header Strict-Transport-Security 'max-age=15552000';

location /_logs/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_pass https://chatlogs.jabber.ru/;
}
location /_logs/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_pass https://chatlogs.jabber.ru/;
}

location /old-logs/ {
alias /opt/codingteam/old-logs/;
index index.html;
}

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host codingteam.org.ru;
proxy_http_version 1.1;
proxy_pass http://localhost:5000/;
}
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host codingteam.org.ru;
proxy_http_version 1.1;
proxy_pass http://localhost:5000/;
}
}

server {
listen 80;
server_name codingteam.org.ru;
listen 80;
server_name codingteam.org.ru;

location / {
rewrite ^(.*)$ https://codingteam.org.ru$1 permanent;
}
location / {
rewrite ^(.*)$ https://codingteam.org.ru$1 permanent;
}
}