2015-12-02 43 views
1

我們對老化的WAS應用服務器存在問題,並且它指向空白的ssl證書的長度將不會支持它,並且第三方不會更改那裏的證書,這很公平。通過apache將出站http呼叫轉換爲https

所以有可能讓我們的應用服務器對第三方進行http調用,但是我們的apache web服務器將請求重寫爲https,然後第三方可以通過https響應,但是我們的apache web服務器會重寫這個再回到http使我們的應用服務器開心?

回答

2

我會考慮mod_proxy。 take a look here

像應該應該滿足您的需求:

<VirtualHost *:443> 
    ServerName domain.tld 
    ServerAlias www.domain.tld 

    ... ssl and cert statements 

    ProxyPass/http://new.domain.tld/ 
    ProxyPassReverse/http://new.domain.tld/ 
</VirtualHost> 

,如果你需要它反之亦然:

<VirtualHost *:80> 
    ServerName domain.tld 
    ServerAlias www.domain.tld 

    SSLProxyEngine On 
    ProxyPass/https://new.domain.tld/ 
    ProxyPassReverse/https://new.domain.tld/ 

</VirtualHost> 
+1

很好的回答 - 但我認爲OP希望發起一個HTTP請求和代理到https。 –

+1

那麼它應該反之亦然; '的 服務器名使用domain.tld ServerAlias是www.domain.tld SSLProxyEngine在 的ProxyPass/HTTPS://new.domain.tld/ ProxyPassReverse/HTTPS://new.domain.tld/ 的SSLEngine上 了SSLCertificateFile /etc/myssl/public.pem 了SSLCertificateKeyFile /etc/myssl/privkey.pem SSLCertificateChainFile /etc/myssl/chain-class2.pem ' – FrW