bryan.blackbee
bryan.blackbee

Reputation: 1954

Unable to see Django page

I have a django site that is deployed in production and already ran python manage.py runserver and so now the server is running on the port of 8000.

So what I want to do is to hit the running server and visited this on the domain domainname.com:8000 and am not getting any response from the server.

Should I be doing something else? Very noob sysadmin here.

Note: Already set debug=False and ALLOWED_HOSTS = ['domain.com']

Upvotes: 0

Views: 50

Answers (2)

Wtower
Wtower

Reputation: 19902

Additionally to @bruno desthuilliers answer, with which I totally agree, if nevertheless you insist, you have to run the server as:

python manage.py runserver 0.0.0.0:8000

so that to let it listen to any interface.

Relevant documentation: django-admin.

Upvotes: 0

bruno desthuilliers
bruno desthuilliers

Reputation: 77892

I have a django site that is deployed in production and already ran python manage.py runserver

That's not how you deploy Django projects in production, cf https://docs.djangoproject.com/en/1.8/howto/deployment/

The builtin dev server is only made for dev - it's unsafe, doesn't handle concurrent requests etc.

Upvotes: 7

Related Questions