Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently had a bit of problem when recently by Deploying Django with mod_wsgi due to SELinux. Usually world get a "Permission denied" error (403). This was solved by disabling SELinux.

Is there a way to use mod_wsgi while SELinux is enabled? Now if I was to move my djcode folder to /usr/local/ this would work, but if the djcode folder is stored /usr/local/src/djcode, it will give me again this error.

Cannot load /etc/httpd/modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot restore segment prot after reloc: Permission denied

I have looked at some logs and it says this:

SElinux is preventing the httpd from using potentially mislabel files ./src (src_1)

So how would I allow the httpd use the src folder?

share|improve this question
add comment

1 Answer

Someone wrote a guide to using SELinux with python web app's (w/ wsgi) here: http://www.packtpub.com/article/selinux-secured-web-hosting-python-based-web-applications

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.