Apache2 WSGI Flask app gives sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file

Viewed 216

I get this error when I try to enter my Flask app running on WSGI and Apaceh2: enter image description here

The problem is, when I just run the Flask app and stop apache2, the error doesn't occur. But when I open Apache2, the error occurs. The file is located at /var/www/html/meondashboard/configs. This is how my 000-default.conf file look like: enter image description here

This is how I access the file: enter image description here

How can I fix this? Do I need to restart my VPS? I would appreciate any type of help, thanks in advance.

1 Answers

Give app.config['SQLALCHEMY_DATABASE_URI'] full path. Then give .db file ownership to www-data.

Related