]> git.parisson.com Git - telecaster-server.git/commitdiff
update nginx conf
authorGuillaume Pellerin <pellerin@parisson.com>
Mon, 5 May 2025 14:19:12 +0000 (16:19 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 5 May 2025 15:55:57 +0000 (17:55 +0200)
etc/nginx/sites-available/telecaster.conf

index e8592edd558b21848065555e9c094f90e1ce49c9..9f4a4ec1569075b22ef65f5911c7e4a2b65ac271 100644 (file)
@@ -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;
+  }
+
+}