deploying django

119 views
Skip to first unread message

ngangsia akumbo

unread,
Aug 4, 2014, 4:53:00 AM8/4/14
to django...@googlegroups.com
I have created a complete site, 

i have configured it to run with mysql using wamp

i have also configured apache in wamp which is up and running

so i want to deploy the site to run as a life page on the internet using apache

what should i do next

Collin Anderson

unread,
Aug 4, 2014, 8:32:52 AM8/4/14
to django...@googlegroups.com
I'd start by reading the docs on deploying with apache and mod_wsgi https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/

Adrian Marshall

unread,
Aug 4, 2014, 6:12:16 PM8/4/14
to django...@googlegroups.com
I've went through a few different ways. If your set on using apache, Configure Apache with Mod-WSGI on a server.

Here's a Good Tutorial: http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/

If you're having trouble with that and your app isn't too demanding you can easily upload on Heroku and control it easily using Git commands.

check out the docs: https://devcenter.heroku.com/articles/getting-started-with-django

An alternative to both of those would be to use Nginx with uWSGI. If you want to go that route here's a good tutorial:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#concept

Good luck!

Jeff Trawick

unread,
Aug 5, 2014, 12:17:22 PM8/5/14
to django...@googlegroups.com
On Monday, August 4, 2014 6:12:16 PM UTC-4, Adrian Marshall wrote:
I've went through a few different ways. If your set on using apache, Configure Apache with Mod-WSGI on a server.

Here's a Good Tutorial: http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/

If you're having trouble with that and your app isn't too demanding you can easily upload on Heroku and control it easily using Git commands.

check out the docs: https://devcenter.heroku.com/articles/getting-started-with-django

An alternative to both of those would be to use Nginx with uWSGI. If you want to go that route here's a good tutorial:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#concept

As if that weren't enough, you can deploy with Apache httpd proxy + uWSGI in a very similar manner to Nginx + uWSGI. Some may find that more natural than with mod_wsgi.  You can see how similar it can be to an Nginx setup at http://emptyhammock.com/projects/info/pyweb/

But the op says "wamp" which usually means Windows.

gunicorn isn't for Windows, uWSGI 1.9 docs mention some experimental Cygwin port.  What's a suitable production-ready Python "app server" for Windows that would work with Apache httpd or Nginx?  Maybe Apache httpd + mod_wsgi is the way to go there.  (shrug)

ngangsia akumbo

unread,
Aug 6, 2014, 4:17:56 AM8/6/14
to django...@googlegroups.com

i migrated everything in to linux mint

ngangsia akumbo

unread,
Aug 6, 2014, 4:37:51 AM8/6/14
to django...@googlegroups.com
Please i have a question

here is the path to my django project

(testproject)yems@yems ~/Documents/testproject/hotel $


(testproject)yems@yems ~/Documents/testproject/hotel $ ls
blog  event  gallery  home  hotel  manage.py  yems
(testproject)yems@yems ~/Documents/testproject/hotel $ cd event
(testproject)yems@yems ~/Documents/testproject/hotel/event $ ls
admin.py  admin.pyc  __init__.py  __init__.pyc  models.py  models.pyc  templates  tests.py  views.py  views.pyc
(testproject)yems@yems ~/Documents/testproject/hotel/event $


I have to add this at the bottom of my httpd.conf file in the apache

WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonPath /path/to/mysite.com

<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>


so how can i add this path , am some how confused here



Collin Anderson

unread,
Aug 6, 2014, 8:26:06 AM8/6/14
to django...@googlegroups.com
It would look like this:

WSGIScriptAlias / /home/yems/Documents/testproject/hotel/hotel/wsgi.py
WSGIPythonPath /home/yems/Documents/testproject/hotel

<Directory /home/yems/Documents/testproject/hotel/hotel>

ngangsia akumbo

unread,
Aug 6, 2014, 10:20:48 AM8/6/14
to django...@googlegroups.com
Thanks bro will chceck if it works
Reply all
Reply to author
Forward
0 new messages