Destroyed Nginx Reverse Proxy Configuration (markdown)

This commit is contained in:
TheFrenchGhosty 2020-11-30 16:57:55 +00:00
parent 14ee7c439d
commit d079f8bc6f

View File

@ -1,29 +0,0 @@
This is a very basic nginx reverse proxy config, secured with Let's Encrypt. Do not forget to replace ServerName with your domain and make sure you are redirecting `proxy_pass` to the correct port.
```
# This first block redirects non-HTTPS traffic to secure port 443. Optional, but recommended.
server {
listen 80;
listen [::]:80;
server_name invidious.domain.tld;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name invidious.domain.tld;
ssl_certificate /etc/letsencrypt/live/invidious.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/invidious.domain.tld/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```