0

I installed my django project on Apache web server using mod_wsgi. I used a WSGIScriptAlias directive inside VirtualHost, pointing to a wsgi_handler.py file in my project. It worked fine.

Nevertheless, I had to write inside the wsgi_handler.py something like: sys.append(absolute_file_path) in order to include some python libraries. Is it possible to do this in a server config file for all wsgi aliases? I have tried setting WSGIPythonPath inside mod_wsgi.conf to no success.

Any help appreciated.

1 Answer 1

2

If using embedded mode of mod_wsgi you use WSGIPythonPath directive. If you are using daemon mode, you use the python-path option to the appropriate WSGIDaemonProcess directive.

Ensure you are not using mod_wsgi 1.X and not using mod_python in same Apache.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.