Конфигурация в Ubuntu (
Код: Выделить всё
/etc/apache2/sites-available/subdomain.example.com.conf
Код: Выделить всё
WSGIPythonPath /var/www/www/path/to/flask/venv/lib/python3.10/site-packages
ServerName subdomain.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/path/to/flask
WSGIDaemonProcess flaskapp threads=5
WSGIScriptAlias / /var/www/path/to/flask/flaskapp.wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup flaskapp
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
ErrorLog ${APACHE_LOG_DIR}/flask-error.log
CustomLog ${APACHE_LOG_DIR}/flask-access.log combined
SSLCertificateFile /etc/letsencrypt/live/example.com-0002/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com-0002/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
Код: Выделить всё
/etc/httpd/conf/httpd.conf
Код: Выделить всё
AllowOverride None
# Allow open access:
Require all granted
# Flask app related
WSGIDaemonProcess flaskapp threads=5
WSGIScriptAlias /subfolder /var/www/path/to/flask/flaskapp.wsgi
WSGIApplicationGroup %{GLOBAL}
Пожалуйста, помогите, спасибо.
Подробнее здесь: https://stackoverflow.com/questions/792 ... cess-group