ojuso-map/support/nginx/nginx.template

135 lines
3.4 KiB
Plaintext
Raw Normal View History

2017-05-19 00:23:18 +00:00
server {
listen 80; listen [::]:80;
server_name _;
location /.well-known/acme-challenge {
alias /web/acme;
}
2017-06-16 16:06:22 +00:00
location / {
return 301 https://$host$request_uri;
}
2017-05-19 00:23:18 +00:00
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name map.ojuso.org;
ssl_certificate /web/certs/map.ojuso.org/fullchain.pem;
ssl_certificate_key /web/certs/map.ojuso.org/privkey.pem;
ssl_dhparam /web/certs/dhparam.pem;
ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
include directives/*;
location /static/ {
alias /web/static/;
expires 30d;
}
location / {
proxy_pass http://map:8000;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
2017-05-20 23:58:54 +00:00
client_max_body_size 20M;
2017-05-19 00:23:18 +00:00
}
#server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name forum.ojuso.org;
#
# ssl_certificate /web/certs/forum.ojuso.org/fullchain.pem;
# ssl_certificate_key /web/certs/forum.ojuso.org/privkey.pem;
# ssl_dhparam /web/certs/dhparam.pem;
# ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
#
# include directives/*;
#
# http2_idle_timeout 5m;
#
# location / {
# proxy_pass http://unix:/web/run/discourse.sock:;
# proxy_set_header Host $http_host;
# proxy_http_version 1.1;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto https;
# }
#
#}
2017-05-19 00:23:18 +00:00
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name i18n.ojuso.org;
2017-05-19 00:23:18 +00:00
ssl_certificate /web/certs/i18n.ojuso.org/fullchain.pem;
ssl_certificate_key /web/certs/i18n.ojuso.org/privkey.pem;
2017-05-19 00:23:18 +00:00
ssl_dhparam /web/certs/dhparam.pem;
ssl_trusted_certificate /web/certs/i18n.ojuso.org/chain.pem;
2017-05-19 00:23:18 +00:00
include directives/*;
http2_idle_timeout 5m;
location / {
return 301 https://translate.ojuso.org$request_uri;
2017-05-19 00:23:18 +00:00
}
2017-05-20 23:58:54 +00:00
}
2017-05-20 23:58:54 +00:00
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name translate.ojuso.org;
2017-05-20 23:58:54 +00:00
ssl_certificate /web/certs/translate.ojuso.org/fullchain.pem;
ssl_certificate_key /web/certs/translate.ojuso.org/privkey.pem;
2017-05-20 23:58:54 +00:00
ssl_dhparam /web/certs/dhparam.pem;
ssl_trusted_certificate /web/certs/translate.ojuso.org/chain.pem;
2017-05-20 23:58:54 +00:00
include directives/*;
http2_idle_timeout 5m;
root /web/weblate/data/static;
location /favicon.ico {
alias /web/weblate/data/static/favicon.ico;
expires 30d;
add_header Cache-Control "public";
}
location /robots.txt {
alias /web/weblate/data/static/robots.txt;
expires 30d;
add_header Cache-Control "public";
}
location /static {
alias /web/weblate/data/static/;
expires 30d;
add_header Cache-Control "public";
}
location /media {
alias /web/weblate/data/media/;
expires 30d;
add_header Cache-Control "public";
}
location / {
proxy_pass http://weblate:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Cache-Control "no-cache";
}
2017-05-19 00:23:18 +00:00
}