Reputation: 26896
After we installed the Django, we use the command:
python manage.py runserver
we can run a server, but I don't know the server is which server, and I searched the django directory, find the server is not in the directory:
aircraftdeMacBook-Pro:Django-1.11.2-py2.7.egg ldl$ cd django/
aircraftdeMacBook-Pro:django ldl$ ls
__init__.py bin dispatch shortcuts.pyc utils
__init__.pyc conf forms template views
__main__.py contrib http templatetags
__main__.pyc core middleware test
apps db shortcuts.py urls
So, I have two questions:
Upvotes: 5
Views: 6847
Reputation: 68
1) Django provides a default wsgi server as @sach20 mentioned.
2) The django server should be used for development. I personally use nginx and gunicorn to run my server. You can find a tutorial on how to set on up here: Tutorial
3) You can run:
python manage.py runserver 0.0.0.0:80
You can substitute 80 with any port you want to use.
Upvotes: 3
Reputation: 2013
Django runserver
is a local dev server, should not be used in production... APACHE AND NGINX are different things.
Django provides a simple WSGI server as a dev server.
Also id guess you have not looked inside the django docs because what you are looking for is right here
Examples of using different ports and addresses¶
Port 8000 on IP address 127.0.0.1:
django-admin runserver Port 8000 on IP address 1.2.3.4:
django-admin runserver 1.2.3.4:8000 Port 7000 on IP address 127.0.0.1:
django-admin runserver 7000
Upvotes: 4