I installed my django project o开发者_如何转开发n 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.
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.
精彩评论