2013-05-04 71 views
1

文摘URI不匹配我有我的網絡上的兩臺服務器。一個有外部IP,另一個只有內部IP。我有我的服務器設置,這樣會http://my.site.com/Motes/實際上是在地址192.168.1.102進入到內部服務器的根目錄,例如:面向外部的服務器與代理

的httpd.conf:

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> 

這工作,直到我打開內部服務器上的摘要式身份驗證通過添加:

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

到其他內部服務器根.htaccess文件。然後我的內部服務器抱怨:

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

任何人都知道如何解決這個問題?

回答

0

所以,我加入了新的CNAME對於我的面向外部的服務器直接代理到內部服務器我的內部服務器,在本質上是代理虛擬主機解決了這個問題。

<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> 

然後內部服務器像問題一樣強制執行摘要驗證。

+0

你所說的「CNAME」是什麼意思?我與你的DNS主機有完全相同的問題 – Poul 2013-07-17 22:25:47

+0

CNAME記錄,'A'記錄也可以。從本質上講,我使用http://my.site.com/Motes/去下使用http://internal.site.com/和設置在vhost.conf文件的虛擬主機在「附加」文件夾'config'文件夾。 – Motes 2013-07-18 14:31:32