I start Flask with the command python3 init.py and the page is accessible by IP address, then I want the page to be constantly running using apache to do all possible manipulations, create the wsgi file, add the config to the Apache folder, restart the Apache, the page does not appear. Tell me where is the error? I feel that I am calling incorrectly or indicating the paths incorrectly. In the example, the domain folder is replaced by me specifically.
Did everything according to the instructions https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps
What am I doing wrong?
<VirtualHost *:80>
ServerName мой_домен.ru
ServerAdmin admin@мой_домен.ru
WSGIScriptAlias / /var/www/jointproject/data/www/мой_домен.ru/FlaskApp/flaskapp.wsgi
<Directory /var/www/jointproject/data/www/мой_домен.ru/FlaskApp/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/jointproject/data/www/мой_домен.ru/FlaskApp/static
<Directory /var/www/jointproject/data/www/мой_домен.ru/FlaskApp/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
=============================================================================
flaskapp.wsgi
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/jointproject/data/www/мой_домен.ru/")
from init import app as application
application.secret_key = '6036037'
===========================================================================
init.py
from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, I love Digital Ocean!"
if __name__ == "__main__":
app.run(debug=True, host = '109.248.11.175')```