Add nginx template

This commit is contained in:
Chocobozzz 2020-08-13 08:05:59 +02:00
parent f5f63ca5f7
commit 83cec31a6c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name domain.tld;
access_log /var/log/nginx/peertube_search_index_access.log;
error_log /var/log/nginx/peertube_search_index_error.log;
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
root /var/www/peertube-search-index;
location = / {
try_files /index.template.html =404;
}
location ^~ '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/certbot;
}
location / {
proxy_pass http://localhost:3234;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}