Jon*_*ley 5 proxy ldap mod-wsgi apache-2.2
主要是通过反复试验,我在下面创建了 Apache 配置文件。
它旨在允许 localhost:8002 上的服务器和通过 WSGI 的 trac 服务器共享 LDAP 服务器,并且看起来在同一个域/端口上。
这些规则是孤立运行的,但不是并行运行的。
特别是,trac WSGI 只有在ProxyPass/ProxyPassReverse行被注释掉时才能正确服务。如果没有重定向,localhost:8002 处的服务器显然不会映射到传出的 8022 端口。
我假设目录、代理和位置规则的组合是我的问题的路径 - 或者它们的顺序?
WSGIDaemonProcess trac stack-size=524288 python-path=/usr/lib/python2.5/site-packages
WSGIScriptAlias /trac /home/web/foo/parts/trac/tracwsgi/cgi-bin/trac.wsgi
<VirtualHost foo.bar.com:8022>
ServerName foo.bar.com
ServerAlias foo.bar.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://localhost:8002/VirtualHostBase/http/foo.bar.com:8022/foo/VirtualHostRoot/
ProxyPassReverse / http://localhost:8002/VirtualHostBase/http/foo.bar.com:8022/foo/VirtualHostRoot/
<Directory "/home/web/foo/parts/trac/tracwsgi/cgi-bin">
WSGIApplicationGroup %{GLOBAL}
Options +Indexes FollowSymLinks
AllowOverride None
Allow from all
Order allow,deny
</Directory>
<Location "/trac">
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Login"
AuthLDAPURL "ldap://127.0.0.1:389/dc=foo-bar,dc=org?uid"
AuthLDAPBindDN "cn=admin, dc=foo-bar, dc=org"
AuthLDAPBindPassword secret
require valid-user
</Location>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
添加:
ProxyPass /trac !
Run Code Online (Sandbox Code Playgroud)
在“/”的 ProxyPass 之前。
看:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass
您还缺少 WSGIProcessGroup 指令。该 Trac 实例不会在您创建的守护进程模式进程中运行。看:
http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac
| 归档时间: |
|
| 查看次数: |
17369 次 |
| 最近记录: |