From 20a7a5d27b7eafbe6a9eafe46a99a6cd3f14b9b5 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 5 May 2025 16:19:12 +0200 Subject: [PATCH] update nginx conf --- etc/nginx/sites-available/telecaster.conf | 70 +++++++++++------------ 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/etc/nginx/sites-available/telecaster.conf b/etc/nginx/sites-available/telecaster.conf index e8592ed..9f4a4ec 100644 --- a/etc/nginx/sites-available/telecaster.conf +++ b/etc/nginx/sites-available/telecaster.conf @@ -1,37 +1,35 @@ -# the upstream component nginx needs to connect to -upstream django { - # server unix:///path/to/your/mysite/mysite.sock; # for a file socket - server unix:///home/telecaster/apps/telecaster/instance/django.sock; # for a web port socket (we'll use this first) - } - server { - # the port your site will be served on - listen 80; - # the domain name it will serve for - server_name _; # substitute your machine's IP address or FQDN - charset utf-8; - - # max upload size - client_max_body_size 75M; # adjust to taste - - # Django media - location /media { - alias /home/telecaster/archives/; # your Django project's media files - amend as required - #autoindex on; - } - - location /static { - alias /var/www/static/; # your Django project's static files - amend as required - } - - # Finally, send all non-media requests to the Django server. - location / { - uwsgi_pass django; - include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed - #uwsgi_pass_request_body on; - } - - error_log /var/log/nginx/error_telecaster.log; - access_log /var/log/nginx/access_telecaster.log; - - } + listen 80; + listen [::]:80; + server_name _; + + access_log off; + error_log /var/log/nginx/telecaster.log; + + charset utf-8; + client_max_body_size 4096M; + + location / { + uwsgi_pass localhost:10023; + include uwsgi_params; + uwsgi_read_timeout 300; + } + + location /media/ { + alias /home/telecaster/archives/; + } + + location /static/ { + alias /var/www/static/; + } + + location /favicon.ico { + alias /var/www/static/telemeta/images/favicon.ico; + } + + location /stream/ { + proxy_pass http://localhost:8000/; + include proxy_params; + } + +} -- 2.39.5