简体   繁体   中英

Digest URI mismatch with proxy

I have two servers on my network. One has an external IP, the other internal only. I have my server setup so that going to http://my.site.com/Motes/ actually goes to the root of the internal server at address 192.168.1.102, like so:

httpd.conf of outward facing server:

ProxyPass /Motes/ http://192.168.1.102/
ProxyPassReverse /Motes/ http://192.168.1.102/



<Proxy  http://192.168.1.102/*>
    Order allow,deny
    Allow from All
    AuthType Digest
    AuthName "Motes"
    AuthDigestDomain /
    AuthDigestProvider file
    AuthUserFile ps.wd
    AuthGroupFile group.file
    Require group usergroup
</Proxy>

This works until I turn on Digest authentication on the interal server by adding:

AuthType Digest
AuthName "Motes"
AuthDigestDomain / /Motes/
AuthDigestProvider file
AuthUserFile ps.wd
AuthGroupFile group.file
Require group usergroup

to the other internal server root .htaccess file. Then my internal servers complains about:

[Sat May 04 09:37:32 2013] [error] [client ***.***.***.***] Digest: uri mismatch - </Motes/> does not match request-uri </>

Anyone know how to fix this?

So, I fixed this by adding a new CNAME for my internal server that my external facing server proxied directly to the internal server, in essence a proxied virtual host.

<virtualhost *:80>
ServerName internal.site.com

ProxyPass / http://192.168.1.102:80/
ProxyPassReverse / http://192.168.1.102:80/
<Proxy http://192.168.1.102:80/* >
    Order allow,deny
    Allow from All
    Satisfy Any 
</Proxy>

</virtualhost>

Then the internal server enforces digest authentication like in the question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM