小编sja*_*jas的帖子

目录、代理和位置 - 如何在一个 Apache 配置中共存?

主要是通过反复试验,我在下面创建了 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 …
Run Code Online (Sandbox Code Playgroud)

proxy ldap mod-wsgi apache-2.2

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

apache-2.2 ×1

ldap ×1

mod-wsgi ×1

proxy ×1