Django - Apache - AWS --- 403 Forbidden : У вас нет разрешения на доступ к этому ресурсу. ошибка

Я пытался запустить мое приложение Django через apache, но я получаю ошибку 403 после настройки apache и предоставления разрешений.

Мои настройки следующие:

Файл Apache conf:

<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/ubuntu/vedvund_website/static
    <Directory /home/ubuntu/vedvund_website/static>
        Require all granted
    </Directory>


    Alias /media /home/ubuntu/vedvund_website/media
    <Directory /home/ubuntu/vedvund_website/media>
        Require all granted
    </Directory>


    <Directory /home/ubuntu/vedvund_website/config>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
    
    WSGIPassAuthorization On
    
    WSGIScriptAlias / /home/ubuntu/vedvund_website/config/wsgi.py
    WSGIDaemonProcess vedvund_website python-path=/home/ubuntu/vedvund_website python-home=/home/ubuntu/vedvund_website/venv
    WSGIProcessGroup vedvund_website

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Разрешения выданы:

chmod 664 db.sqlite3 
sudo chown :www-data /home/ubuntu/vedvund_website/db.sqlite3
sudo chown :www-data /home/ubuntu/vedvund_website
sudo chown :www-data /home/ubuntu/vedvund_website/config

Но я получаю ошибку при попытке доступа, используя мой IP-адрес (публичный IP-адрес AWS)

Запрещено У вас нет разрешения на доступ к этому ресурсу.

Может ли кто-нибудь сообщить мне, если я пропустил предоставление дополнительных разрешений?

Необходимо дать дополнительное разрешение

sudo chmod 755 /home/USER_NAME

теперь он работает нормально

Вернуться на верх