Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
Flask Deploy VPS Apache

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')```
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda