Pasta: /etc/apache2/sites-available
Comandos apache:
- sudo a2ensite site.conf
- sudo systemctl reload apache2
- sudo apachectl restart
Arquivo: site.conf
WSGIDaemonProcess venv python-home=/home/project_python/venv python-path=/home/project_python
WSGIProcessGroup venv
WSGIPythonHome /home/project_python/venv
WSGIScriptAlias /url_path /home/project_python/python_file.py/ process-group=venv
<Directory /home/project_python>
Require all granted
SetHandler wsgi-script
Options ExecCGI
Options +FollowSymLinks
</Directory>
AddType text/html .py