Commits

Massimiliano Ravelli committed cda1df8

fixed nginx configuration

Comments (0)

Files changed (2)

fagungis/conf/nginx.conf

                 proxy_pass   http://%(gunicorn_bind)s;
         }
 
-        location %(django_media_location)s/
+        location /%(django_media_location)s/
         {
                 root %(django_media_root)s/;
         }
 
-        location %(django_static_location)s/
+        location /%(django_static_location)s/
         {
                 root %(django_static_root)s/;
         }

fagungis/tasks.py

     # Template
     upload_template(template, env.nginx_conf_file,
                     context=context, backup=False)
-    sudo('ln -sf %s /etc/nginx/sites-enabled/' % env.nginx_conf_file)
+    sudo('ln -sf %(nginx_conf_file)s /etc/nginx/sites-enabled/%(project)s.conf' % env)
     _test_nginx_conf()
     sudo('nginx -s reload')