From: Guillaume Pellerin Date: Thu, 22 Feb 2018 12:19:27 +0000 (+0100) Subject: Nginx timesout to 600s X-Git-Tag: 1.6.6~9 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=15f960c6f04b9e05b54f08b94165f645d374f3c2;p=telemeta.git Nginx timesout to 600s --- diff --git a/docker-compose.yml b/docker-compose.yml index dfd8c83e..47d88e97 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -81,7 +81,7 @@ nginx: ports: - "8000:80" volumes: - - ./etc/nginx.conf:/etc/nginx/conf.d/default.conf + - ./etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf volumes_from: - data links: diff --git a/etc/apt.list b/etc/apt.list deleted file mode 100644 index 81a807a5..00000000 --- a/etc/apt.list +++ /dev/null @@ -1,12 +0,0 @@ -deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free -deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free - -deb http://security.debian.org/ wheezy/updates main -deb-src http://security.debian.org/ wheezy/updates main - -deb http://www.deb-multimedia.org wheezy main non-free -deb http://www.deb-multimedia.org wheezy-backports main - -deb http://debian.parisson.com/debian/ wheezy main -deb-src http://debian.parisson.com/debian wheezy main - diff --git a/etc/apt/sources.list b/etc/apt/sources.list new file mode 100644 index 00000000..81a807a5 --- /dev/null +++ b/etc/apt/sources.list @@ -0,0 +1,12 @@ +deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free +deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free + +deb http://security.debian.org/ wheezy/updates main +deb-src http://security.debian.org/ wheezy/updates main + +deb http://www.deb-multimedia.org wheezy main non-free +deb http://www.deb-multimedia.org wheezy-backports main + +deb http://debian.parisson.com/debian/ wheezy main +deb-src http://debian.parisson.com/debian wheezy main + diff --git a/etc/nginx.conf b/etc/nginx.conf deleted file mode 100644 index a5649942..00000000 --- a/etc/nginx.conf +++ /dev/null @@ -1,49 +0,0 @@ -server_tokens off; - -server { - listen 80; - server_name nginx; - charset utf-8; - - access_log /var/log/nginx/app-access.log; - error_log /var/log/nginx/app-error.log; - - # max upload size - client_max_body_size 4096M; # adjust to taste - - # Django media - location /media { - alias /srv/media; # your Django project's media files - amend as required - # Django media export - location /media/export { - internal; # protect media files directory only accessible through Django - alias /srv/media/export; - } - # Django media items - location /media/items { - internal; # protect media files directory only accessible through Django - alias /srv/media/items; - } - - } - - # Django static - location /static { - alias /srv/static; # your Django project's static files - amend as required - } - - # phpmyadmin - location /phpmyadmin/ { - proxy_pass http://phpmyadmin/; - #proxy_set_header Host $http_host; - #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - #proxy_set_header X-Forwarded-Server $http_host; - #proxy_redirect / /phpmyadmin/; - #proxy_cookie_path / /phpmyadmin/; - } - - location / { - uwsgi_pass app:8000; - include /etc/nginx/uwsgi_params; - } -} diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf new file mode 100644 index 00000000..5f79aa64 --- /dev/null +++ b/etc/nginx/conf.d/default.conf @@ -0,0 +1,54 @@ +server_tokens off; + +server { + listen 80; + server_name nginx; + charset utf-8; + + access_log /var/log/nginx/app-access.log; + error_log /var/log/nginx/app-error.log; + + # max upload size + client_max_body_size 4096M; # adjust to taste + + # Django media + location /media { + alias /srv/media; # your Django project's media files - amend as required + # Django media export + location /media/export { + internal; # protect media files directory only accessible through Django + alias /srv/media/export; + } + # Django media items + location /media/items { + internal; # protect media files directory only accessible through Django + alias /srv/media/items; + } + + } + + # Django static + location /static { + alias /srv/static; # your Django project's static files - amend as required + } + + # phpmyadmin + location /phpmyadmin/ { + proxy_pass http://phpmyadmin/; + #proxy_set_header Host $http_host; + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header X-Forwarded-Server $http_host; + #proxy_redirect / /phpmyadmin/; + #proxy_cookie_path / /phpmyadmin/; + } + + location / { + uwsgi_pass app:8000; + include /etc/nginx/uwsgi_params; + uwsgi_read_timeout 600; + proxy_set_header Host $http_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; + } +}