Created
August 7, 2021 18:33
-
-
Save Ragzouken/18842d0cd3f037cb7013733dc05a7b36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
include /etc/nginx/mime.types; | |
listen 443 ssl; | |
server_name tinybird.zone; | |
ssl_certificate /etc/letsencrypt/live/tinybird.zone/cert.pem; | |
ssl_certificate_key /etc/letsencrypt/live/tinybird.zone/privkey.pem; | |
access_log /var/log/nginx/tinybird.access.log; | |
error_log /var/log/nginx/tinybird.error.log; | |
root /var/www/tinybird.zone; | |
index index.html; | |
# for the uploader | |
client_max_body_size 50M; | |
location /media/ { | |
alias /www/zone-library/; | |
} | |
location /ytdl/ { | |
alias /www/zone-youtube/; | |
} | |
location /library { | |
proxy_pass http://127.0.0.1:4000; | |
} | |
location /upload { | |
alias /root/zone-library/public/; | |
} | |
location /youtube { | |
proxy_pass http://127.0.0.1:4001; | |
} | |
location / { | |
root /root/zone/public; | |
try_files $uri $uri/ @zone_other; | |
} | |
location @zone_files { | |
try_files $uri $uri/ @zone_other; | |
} | |
location @zone_other { | |
proxy_set_header Host $http_host; | |
# web socket support | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
# forwarding IP | |
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; | |
proxy_pass http://localhost:8080; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
# Fix the “It appears that your reverse proxy set up is broken" error. | |
#proxy_pass http://localhost:80; | |
proxy_read_timeout 90; | |
#proxy_redirect http://localhost:80 https://tinybird.zone; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment