mod_wsgi
Issue #61
resolved
Has anyone successfully gotten Foreman to port to Apache using mod_wsgi? I have no idea what I'm doing there, and have tried following the instructions in the blog post, but Apache2 will not start when the virtual site is active.
If anyone has an idea, I'd love to hear it.
Comments (2)
-
reporter -
reporter - changed status to resolved
See previous post.
- Log in to comment
I've gotten it figured out. I copied the root foreman folder into /var/www/html and ran run_foreman with the setup option. That copied all the files into /usr/local/lib/python2.7/dist-packages/Foreman_Forensics-0.0.1-py2.7.egg.
Something I've learned here... altering the contents of /var/www/html doesn't change what's delivered by Apache, but altering the contents of the Python library did deliver a difference.
My WSGI file is stored at /var/www/html (yes, the same location as run_foreman.py), and contains the following:
My VirtualHost file, /etc/apache2/sites-available/foreman.conf is as follows:
Finally, after doing an a2ensite foreman.conf, Apache restarted without an error.
I noticed that there was no "files" directory at usr/local/lib/python2.7/dist-packages/Foreman_Forensics-0.0.1-py2.7.egg/foreman. I did a sudo cp -R /var/www/html/foreman/files usr/local/lib/python2.7/dist-packages/Foreman_Forensics-0.0.1-py2.7.egg/foreman.
I then had to sudo chmod -R 777 usr/local/lib/python2.7/dist-packages/Foreman_Forensics-0.0.1-py2.7.egg/foreman/files to give Apache permission to save documents in that location.
After setting up a local DNS record, I'm now good to go on my disconnected network.
Thank you!!