From f57f79d40b9a6c8cc1333165ee11a341c78be181 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 17 Apr 2015 19:30:20 +0200 Subject: Install scripts --- install/nginx.conf.template | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 install/nginx.conf.template (limited to 'install/nginx.conf.template') diff --git a/install/nginx.conf.template b/install/nginx.conf.template new file mode 100644 index 000000000..0a68be712 --- /dev/null +++ b/install/nginx.conf.template @@ -0,0 +1,34 @@ +server { + listen #NGINX_PORT#; + server_name #URL#; + root /srv/#DB_NAME#/ishtar/; + access_log /var/log/django/#SHORT_NAME#-access.log; + error_log /var/log/django/#SHORT_NAME#-error.log; + client_max_body_size 20M; + + location /static-#DATE#/ { # STATIC_URL + alias /srv/#DB_NAME#/ishtar/#SHORT_NAME#/static/; # STATIC_ROOT + expires 30d; + } + + location /media/ { # MEDIA_URL + alias /srv/#DB_NAME#/ishtar/#SHORT_NAME#/media/; # MEDIA_ROOT + expires 30d; + } + + location /tinymce/ { + alias /usr/share/tinymce/www/; + expires 30d; + } + + location /javascript/ { + alias /usr/share/javascript/; + expires 30d; + } + + location / { + include uwsgi_params; + uwsgi_pass 127.0.0.1:#UWSGI_PORT#; + } +} + -- cgit v1.2.3