Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过apache将出站http调用转换为https_Apache_Ssl - Fatal编程技术网

通过apache将出站http调用转换为https

通过apache将出站http调用转换为https,apache,ssl,Apache,Ssl,我们的WAS应用服务器存在老化问题,ssl证书的长度直接不支持,第三方不会更改该证书,这是公平的 那么,是否有可能让我们的应用服务器向第三方发出http调用,但我们的apache web服务器将请求重写为https,第三方可以通过https进行响应,但我们的apache web服务器将再次将其重写回http,以使我们的应用服务器满意呢?我会考虑使用mod_代理 类似的内容应该适合您的需要: <VirtualHost *:443> ServerName domain.tld

我们的WAS应用服务器存在老化问题,ssl证书的长度直接不支持,第三方不会更改该证书,这是公平的


那么,是否有可能让我们的应用服务器向第三方发出http调用,但我们的apache web服务器将请求重写为https,第三方可以通过https进行响应,但我们的apache web服务器将再次将其重写回http,以使我们的应用服务器满意呢?

我会考虑使用mod_代理

类似的内容应该适合您的需要:

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

    ... ssl and cert statements

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

ServerName domain.tld
ServerAlias www.domain.tld
... ssl和cert语句
ProxyPass/http://new.domain.tld/
ProxyPassReverse/http://new.domain.tld/
如果您需要,反之亦然:

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

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

</VirtualHost>

ServerName domain.tld
ServerAlias www.domain.tld
SSLProxyEngine打开
ProxyPass/https://new.domain.tld/
ProxyPassReverse/https://new.domain.tld/

回答得很好-但我认为OP希望启动http请求并代理到https。那么应该是相反的<代码>ServerName domain.tld ServerAlias www.domain.tld SSLProxyEngine On ProxyPass/https://new.domain.tld/ ProxyPassReverse/https://new.domain.tld/ SSLCertificateFile/etc/myssl/public.pem SSLCertificateKeyFile/etc/myssl/privkey.pem SSLCertificateChainFile/etc/myssl/chain-class2.pem上的长度