DEV Community

Discussion on: Flask Deploy with Apache on CentOS - Minimal Setup

Collapse
 
xalxnder profile image
Xavier

@sm0ke Thanks for this tutorial! Very helpful!

For anybody referencing a a virtual environment in their wsgi file, and getting Permission Denied in the httpd error logs:

Make sure proper permissions are applied to the virtual environment's parent directories, so that the apache user, or whatever user you have set for the WSGIDaemonProcess, can actually get to it.

Collapse
 
sm0ke profile image
Sm0ke

Hello Xavier. If you have the time, please drop here a config sample that uses WSGIDaemonProcess.
10x mate

Collapse
 
xalxnder profile image
Xavier

I used the same config as your tutorial where the WSGIDaemonProcess will be ran as the apache user.

 ServerName localhost

 WSGIDaemonProcess hitme user=apache group=apache threads=2

 WSGIScriptAlias / /var/www/hitme/wsgi.py

 <Directory /var/www/hitme>
     Require all granted
 </Directory>
Thread Thread
 
sm0ke profile image
Sm0ke

Super cool. Thank you! :)