Report this

What is the reason for this report?

Flask - Apache does not restart my app

Posted on June 22, 2017

I did some changes on my Flask app. Then I used these commands:

sudo service apache2 restart
sudo service apache2 reload

But Flask application is still old. I can see new HTML pages when I enter my site but main python file which runs my app is still old.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

Sounds like you would need to restart your Flask application instead. If you have a systemd service, you could do it with systemctl restart yourprojectname. If not, you could kill the Flask process using the kill command and then start it as normal.

You could take a look at the following tutirial on how to deploy a Flask app with Nginx and USWGI:

https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04#step-5-creating-a-systemd-unit-file

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.