Я хочу получить доступ к моему Django проекту из любой точки мира. По этой причине у меня Raspberry Pi с Ubuntu.
Если я запускаю команду python manage.py runserver
, он запускает проект в http://127.0.0.1:8000/
по умолчанию. Но это локальный хост моего raspberry / ubuntu, и я хочу запустить проект на моем ноутбуке. по этой причине я меняю 127.0.0.1
для адреса моего сервера http://xxx.xx.xx.x:8000/
и запускаю его в своем браузере. ЭТО ОШИБКИ .
Хорошо, читая некоторую информацию, я вижу, что мне нужно открыть порт для удаленного доступа, для этой цели я использую библиотеку ufw
.
Я открываю порт 80, используя ufw
,

Теперь, если я напишу http://xxx.xx.xx.x:80
в своем браузере, не ошибайтесь, покажите это,

Apache config:
<VirtualHost *:80>
ServerAdmin admin@djangoproject.localhost
ServerName djangoproject.localhost
ServerAlias www.djangoproject.localhost
DocumentRoot /home/smart/IoTIB_Dashboard
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/smart/IoTIB_Dashboard/static
<Directory /home/smart/IoTIB_Dashboard/static>
Require all granted
</Directory>
Alias /static /home/smart/IoTIB_Dashboard/media
<Directory /home/smart/IoTIB_Dashboard/media>
Require all granted
</Directory>
<Directory /home/smart/IoTIB_Dashboard/IoTIB_Dashboard>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess django_project python-path=/home/smart/IoTIB_Dashboard python-home=/home/user/IoTIB_Dashboard/env
WSGIProcessGroup IoTIB_Dashboard
WSGIScriptAlias / /home/smart/IoTIB_Dashboard/IoTIB_Dashboard/wsgi.py
Таким образом, я понимаю, что теперь открыт.
Проблема заключается в том, что если теперь я снова запускаю мой django проект как python manage.py runserver 80
, и я снова пишу http://xxx.xx.xx.x:80/user_app/login/
в моем браузере, появляется следующее:

Что я делаю не так? Я новичок ie и не знаю, что мне делать. Цель - получить удаленный доступ к проекту. Кто-нибудь может мне помочь?
Большое спасибо.