Я загрузил проект на сервер ubuntu.
главный проект существует здесь: / home/srafik94/footbalP/live_v 2
wsgi.py существует здесь: /home/srafik94/footbalP/live_v 2/videoservice\wsgi.py
vnv существует здесь: /home/srafik94/footbalP/venv
Я много чего пробовал, но он все еще отображается 403 Ошибка: http://172.105.81.8/
apache2ctl configtest
Syntax OK
Там также говорится об отсутствии синтаксической ошибки,
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias "/static" "/home/srafik94/footbalP/live_v 2/static"
<Directory "/home/srafik94/footbalP/live_v 2/static">
Order allow,deny
Allow from all
Require all granted
</Directory>
Alias "/media" "/home/srafik94/footbalP/live_v 2/media"
<Directory "/home/srafik94/footbalP/live_v 2/media">
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "/home/srafik94/footbalP\live_v 2\videoservice">
<Files "wsgi.py">
Order allow,deny
Allow from all
Require all granted
</Files>
</Directory>
WSGIScriptAlias / "/home/srafik94/footbalP\live_v 2\videoservice\wsgi.py"
WSGIDaemonProcess django_app python-path="/home/srafik94/footbalP\live_v 2" python-home="/home/srafik94/footbalP\venv"
WSGIProcessGroup django_app
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Это мои последние команды:
cd /etc/apache2/sites-available
42 sudo nano djangoProject.conf
44 cd ..
46 cd home
47 cd srafik94
49 cd footbalP
50 cd live_v\ 2
52 sudo a2ensite live_v\ 2
53 sudo a2ensite djangoProject
54 sudo a2ensite 000-default.conf
55 sudo a2disite 000-default.conf
56 sudo a2dissiite 000-default.conf
57 sudo a2dissite 000-default.conf
58 sudo chmod :www-data live_v\ 2/db.sqlite3
59 sudo chown :www-data live_v\ 2/db.sqlite3
60 sudo chmod 664 live_v\ 2/db.sqlite3
61 sudo chown :www-data live_v\ 2
62 ls -ls
63 clear
64 sudo chown -R :www-data live_v\ 2/media/
65 sudo chown -R :www-data live_v\ 2/static/
66 sudo chown -R 775 live_v\ 2/static/
67 sudo touch /etc/config.json
68 sudo nano live_v\ 2/videoservice/settings.py
69 sudo ufw delete allow 8000
70 sudo ufw allow http/tcp
71 sudo service apache2 restart