• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Input Guide for Python Flask App deployement

andostini

New Pleskian
Hey there,

does anybody have a nice guide on deploying python flask applications on plesk. I have already tried many different ways but most of them stall at some point, mostly because of plesk related issues.

Or maybe does someone have some experience and can recommend a certain path to go. Like using passenger, or gunicorn? No expecting a full guide but some technologies that you have made good experience with?


Would be greatful on sime help here.

Fabian
 
Hey there,

does anybody have a nice guide on deploying python flask applications on plesk. I have already tried many different ways but most of them stall at some point, mostly because of plesk related issues.

Or maybe does someone have some experience and can recommend a certain path to go. Like using passenger, or gunicorn? No expecting a full guide but some technologies that you have made good experience with?


Would be greatful on sime help here.

Fabian

I managed to run a Flask Hello World on VPS Server with Linux and Apache by following instructions from Install and configure a full software stack for a Flask app: Apache, Gunicorn, MongoDB, Redis - Vioan's Blog

My starting point was a visible web domain that could access an index.html page.

# I removed the index.html
export LC_ALL=C
sudo python3 -m venv venv
. venv/bin/activate
# I created a file with hello world flask app https://flask.palletsprojects.com/en/1.1.x/quickstart/#a-minimal-application
export LC_ALL=C
pip install Flask
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export FLASK_APP=hello.py
flask run
# for some debug messages run flask run --host=0.0.0.0
# from Install and configure a full software stack for a Flask app: Apache, Gunicorn, MongoDB, Redis - Vioan's Blog I followed did the following part:

--------------------------------
# configure Apache to serve our Flask app:
a2enmod proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
service apache2 restart

#create our Apache config file specific to our domain:
cd /var/www/vhosts/system/<your domain>/conf

# in file /var/www/vhosts/system/<your domain>/conf/vhost.conf enter the content below.
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
<Location "/">
ProxyPass "http://127.0.0.1:5000/"
ProxyPassReverse "http://127.0.0.1:5000/"
</Location>

# Restart Apache
service apache2 restart

#Access your website using HTTP:// not HTTPS:// as a first step
--------------------------------
 
Last edited:
Back
Top