Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

85
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda