Datura-Network/1-Privacy-Front-Ends/invidious/nginx.conf
2024-02-26 11:04:02 +01:00

34 lines
1.1 KiB
Nginx Configuration File

server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
######## TOR CHANGES ########
#listen 4443;
#listen [::]:4443;
#server_name iv.daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion;
add_header Onion-Location "http://iv.daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion$request_uri" always;
######## TOR CHANGES ########
server_name iv.datura.network;
access_log off;
error_log /var/log/nginx/error.log crit;
ssl_certificate /root/.acme.sh/iv.datura.network/fullchain.cer;
ssl_certificate_key /root/.acme.sh/iv.datura.network/iv.datura.network.key;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host; # so Invidious knows domain
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
}
if ($https = '') { return 301 https://$host$request_uri; } # if not connected to HTTPS, perma-redirect to HTTPS
}