开发者

Problem with mod_wsgi

开发者 https://www.devze.com 2023-02-09 00:35 出处:网络
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 f

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消