1
0
mirror of https://framagit.org/framasoft/peertube/search-index/ synced 2024-12-12 09:06:08 +01:00

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

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;
}
}