Re: Django and apache
Set STATIC_ROOT in your settings.py and run 'collectstatic'.
You need not mention in your /static/admin /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin in your apache conf then.
On Mon, May 13, 2013 at 7:16 AM, Stanley Agba <stanley.agba@gmail.com> wrote:
Thanks Guys,The server is up and running with mod_wsgi, tho the admin page is not loading with the static files.I have added this to my apache.conf file:Alias /static/admin /usr/lib/python2.7/dist-packages/django/contrib/admin/static/adminKind of stuck after this--
On Sunday, 12 May 2013 11:17:04 UTC+1, Stanley Agba wrote:Hello guys,please I'm kind of a noob at django and I'm trying to deploy a django site on Apache with mod_wsgi, I am not using a virtualenv as the server has python installed.I added the following to my /etc/apache2/apache2.conf<VirtualHost example:80>ServerName exampleServerAlias exampleServerAdmin example@example.comDocumentRoot /var/www/example/staticWSGIScriptAlias / /var/www/example/example/wsgi.pyWSGIPythonPath /var/www/example<Directory /var/www/example/example><Files wsgi.py>Order allow,denyAllow from all</Files></Directory>Alias /head.jpg /var/www/example/static/head.jpgAlias /media/ /var/www/example/uploadsAlias /static /var/www/example/static<Directory /var/www/example/static>Order deny,allowAllow from all</Directory><Directory /var/www/example/uploads>Order deny,allowAllow from all</Directory>ErrorLog /var/www/python_ng/logs/error.logCustomLog /var/www/python_ng/logs/access.log combined</VirtualHost>I got a 'WSGIPythonPath cannot be in virtual host section' error.I have searched for previous topics but i have not been able to get a solution, I would greatly appreciate any help.Thanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home