-1

I have uploaded my django files into the server... When I worked on local host I wrote in console python manage.py runserver

How do I tell the server that He should run this project?

I read this topic How do I run a Python script on my web server? but it doesn't proved actuall instructions. I have no idea what is this cgi folder. The documntation link there isn't much of help as well.

My server runs many applications and it's already on... I wish to add a new python application to it.

Community
  • 1
  • 1

2 Answers2

3

Django's runserver is not supposed to work for production server, you will need to use gunicorn or uwsgi for this and of course disabling DEBUG mode with DEBUG=False

You can use this tutorial which help you how to setup your server and use supervisord to manage processes.

Mounir
  • 11,306
  • 2
  • 27
  • 34
  • The guide is setting up a new server.... My server is already up, the projects already sits there. I just need the equivelent of runserver.... DEBUG settings are off. – user3754582 Sep 20 '15 at 11:23
  • 3
    you do not _need_ gunicorn nor uwsgi, actually you can use any server setup that meets your requirements – Hedde van der Heide Sep 20 '15 at 11:40
0

Well you can always log into the server and use the same commands.

But as Mounir says, the development server isn't intended for production use. Instead you should run it using a "proper" web server. I personally have exeprience using Apache to do this, though there are oher options. A lot really depends on the server setup. Does it have Apache (or Nginx or something similar)?

https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/

wobbily_col
  • 11,390
  • 12
  • 62
  • 86