From: Guillaume Pellerin Date: Mon, 5 May 2025 14:19:12 +0000 (+0200) Subject: update nginx conf X-Git-Tag: 2.6 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2a7a7ee3601b000eeb7d7b736755df4b408b280b;p=telecaster-server.git update nginx conf --- 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; + } + +}