T
T
timurc2020-08-27 15:58:31
Django
timurc, 2020-08-27 15:58:31

Why is the Django site not working?

Hello! I'm making a site on Django - I decided to deploy a site on a VPS with an OpenLiteSpeed ​​web server (an open version of LiteSpeed). I set everything up according to the instructions, I start the Django server (python3 manage.py runserver):

(public_html) [email protected]:/home/site/public_html/site$ python3 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
August 27, 2020 - 15:48:52
Django version 3.1, using settings 'site.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

I go to the site, it loads endlessly ... I checked through incognito, the cache has nothing to do with it. At the same time, the system sites on the VPS work. I checked that the ports are open, the firewall does not interfere. DNS is working correctly. Server Ubuntu 18.04 LTS.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-08-27
@bacon

Starting development server at 127.0.0.1:8000
django is running locally on port 8000, is it somehow proxied outside?

A
aimsavagejk, 2020-08-28
@aimsavagejk

You are running the server locally on port 8000.
So either through OpenLiteSpeed ​​listen to external connections and send them to a local address with janga.
Or run Janga on host:8080. Where host is the ip address of your server, before that don't forget to add it to ALLOWED_HOSTS in your project settings.
If the port is busy, then kill the process occupying it, suitable for tests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question