You must install the wsgi module in apache2
sudo apt-get install libapache2-mod-wsgi
Once installed, you must modify your virtualhost and add the following lines:
WSGIDaemonProcess : serves to indicate where your venv is
WSGIProcessGroup : specify what the process is
WSGIScriptAlias : is the equivalent of Alias
Assuming your project is called api and you installed it with the ubuntu user, your virtualhost should look like this:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName ejemplo.com
ServerAlias www.ejemplo.com
WSGIDaemonProcess api python-home=/home/ubuntu/api/venv/ python-path=/home/ubuntu/api
WSGIProcessGroup api
WSGIPassAuthorization On
WSGIScriptAlias / /home/ubuntu/api/wsgi.py
<Directory /home/ubuntu/api>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error_python.log
CustomLog ${APACHE_LOG_DIR}/access_python.log combined
</VirtualHost>
The following code is to give permissions to the file
<Files wsgi.py>
Require all granted
</Files>
Finally you must restart apache2 (I'm assuming that the virtualhost was)