Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

82
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!