title: Deloying Django app Apach2: 403 Forbidden error. Permission denied: mod_wsgi
body: <p>I am trying to deploy my Django app with my Digital Ocean droplet. There was a very useful YouTube tutorial that I followed; when he adjusted settings in Apache2, and then refreshes, he sees his Django app, whereas when I do the same, I get the following error:</p>
  <pre><code>Forbidden
  You don't have permission to access this resource.
  Apache/2.4.46 (Ubuntu) Server at 159.223.6.157 Port 80
  </code></pre>
  <p>Here you see the setup of my /etc/apache2/sites-available/hbm_project.conf file:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      # 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 &quot;a2disconf&quot;.
      #Include conf-available/serve-cgi-bin.conf
  
      Alias /static /home/hbm/hbm_project/static
      &lt;Directory /home/hbm/hbm_project/static&gt;
              Require all granted
      &lt;/Directory&gt;
  
      &lt;Directory /home/hbm/hbm_project/hbm_project&gt;
              &lt;Files wsgi.py&gt;
                      Require all granted
              &lt;/Files&gt;
      &lt;/Directory&gt;
  
      WSGIScriptAlias / /home/hbm/hbm_project/hbm_project/wsgi.py
      WSGIDaemonProcess hbm_app python-home=/home/hbm/hbm_project/venv python-path=/home/hbm/hbm_project python-ho&gt;
      WSGIProcessGroup hbm_app
  </code></pre>
  
  <p>When I look in the error log of Apache2, I see the following error:</p>
  <pre><code>    [Thu Oct 21 07:07:57.606866 2021] [wsgi:warn] [pid 35891:tid 139970948001088] (13)Permission denied: mod_wsgi (pid=35891): Unable to stat Python home /home/hbm/hbm_project/venv. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path.
  Python path configuration:
    PYTHONHOME = '/home/hbm/hbm_project/venv'
    PYTHONPATH = (not set)
    program name = 'python3'
    isolated = 0
    environment = 1
    user site = 1
    import site = 1
    sys._base_executable = '/usr/bin/python3'
    sys.base_prefix = '/home/hbm/hbm_project/venv'
    sys.base_exec_prefix = '/home/hbm/hbm_project/venv'
    sys.platlibdir = 'lib'
    sys.executable = '/usr/bin/python3'
    sys.prefix = '/home/hbm/hbm_project/venv'
    sys.exec_prefix = '/home/hbm/hbm_project/venv'
    sys.path = [
      '/home/hbm/hbm_project/venv/lib/python39.zip',
      '/home/hbm/hbm_project/venv/lib/python3.9',
      '/home/hbm/hbm_project/venv/lib/python3.9/lib-dynload',
    ]
  Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
  Python runtime state: core initialized
  ModuleNotFoundError: No module named 'encodings'
  
  Current thread 0x00007f4d86a26d40 (most recent call first):
  &lt;no Python frame&gt;
  </code></pre>
  <p>There are some comparable errors on the internet, but none of the things that work for other people seems to work for me.
  Hope someone can help me out.</p>
  <p>Thanks!</p>