Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango app on EC2 ubuntu Static File issue
    text
    copied!<p>I have recently uploaded my app on EC2 server running Ubuntu, Python 2.7.3, django.VERSION 1.5.1. I have managed to successfully launch it without any CSS/Images or JS. I can view templates and navigate them means template directory settings are working. Looks like I am missing some setting for static/media files. Can anyone please advise?</p> <p><strong>Content of "cat /etc/apache2/httpd.conf"</strong></p> <pre><code>WSGIScriptAlias / /home/ubuntu/site/ProjectName/ProjectName/wsgi.py WSGIPythonPath /home/ubuntu/site/ProjectName &lt;Directory /home/ubuntu/site/ProjectName/ProjectName&gt; &lt;Files wsgi.py&gt; Order deny,allow Allow from all &lt;/Files&gt; &lt;/Directory&gt; </code></pre> <p><strong>Content of settings.py</strong></p> <pre><code>MEDIA_ROOT = '/var/www/media/' MEDIA_URL = '' STATIC_ROOT = '' STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/var/www/static/admin/' STATICFILES_DIRS = ( '/var/www/static', ) STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) TEMPLATE_DIRS = ('/var/www/templates',) **$ ls -ltr /var/www** </code></pre> <p>total 16<br> -rw-r--r-- 1 root root 177 Jul 26 20:21 index.html<br> drwxr-xr-x 3 www-data root 4096 Jul 28 04:20 static<br> drwxr-xr-x 5 www-data root 4096 Jul 28 04:20 media<br> drwxr-xr-x 20 www-data root 4096 Jul 28 16:29 templates<br></p> <p><strong>Errors in apache2/access.log</strong></p> <p>[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/bootstrap.css HTTP/1.1" 404 1798 [29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/jquery.fancybox.css HTTP/1.1" 404 1806 [29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/jquery.js HTTP/1.1" 404 1798 [29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/jquery.metadata.js HTTP/1.1" 404 1804 [29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/login.css HTTP/1.1" 404 1794 [29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/error.js HTTP/1.1" 404 1794 </p> <p><strong>Errors in apache2/error.log (I dont think it's relevant but just FYI)</strong></p> <p>[Mon Jul 29 13:41:29 2013] [error] /usr/local/lib/python2.7/dist-packages/django/conf/<strong>init</strong>.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See <a href="http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged" rel="nofollow">http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged</a> [Mon Jul 29 13:41:29 2013] [error] DeprecationWarning) [Mon Jul 29 13:41:29 2013] [error] [Mon Jul 29 13:41:35 2013] [error] /usr/local/lib/python2.7/dist-packages/django/conf/<strong>init</strong>.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See <a href="http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged" rel="nofollow">http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged</a> [Mon Jul 29 13:41:35 2013] [error] DeprecationWarning) [Mon Jul 29 13:41:35 2013] [error]</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload