2013-06-18 29 views
0

我遇到了一些尝试在使用Apache代理模块时发布到HTTPS端点的问题。到HTTP端点的帖子工作正常。我对Apache配置相当陌生,所以我希望你们中的一位可能对我做错的事情有一些了解。 Google对这个问题没有太大的帮助。我已经读出的线程的一个例子是(我没有足够的信誉来发布更多的链接):使用Apache代理发布到HTTPS端点时出错

  • SOAP faultcode env:Client
    • 我验证过一个SOAP请求通过了SoapUI的作品,所以它似乎并没有出现我尝试访问的服务有任何问题。服务器网站的

实例端点上托管,还代理:http://websiteAndProxyServer.com

例终点后发布到:https://secureServer.com/AccessManagerSOAP

这里是我想要的总体思路这样做:

HTTP - >代理 - > HTTPS

代理可以让我腌肉nd跨域请求问题。

Apache的版本:2.2.21

jQuery的POST请求:

var url = "http://websiteAndProxyServer.com/idm/AccessManagerSOAP"; 
     $.ajax({ 
       url:url, 
       type:'POST', 
       data: loginRequest, 
       success: createUserAndAuthenticateSuccess, 
       error: createUserAndAuthenticateError 
     }); 

相关Apache配置在httpd.conf:在的httpd-ssl.conf中

#=============mod-proxy================== 
#  UnComment the proxy_module, proxy_balancer_module & proxy_ajp_module below to 
#  use ModProxy for enabling different JSessionID cookie names to be provided. 

LoadModule proxy_module modules/mod_proxy.so 
LoadModule proxy_http_module modules/mod_proxy_http.so 
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so 
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so 

SSLProxyEngine On 

ProxyPass /remote/ http://nonRelatedServer.net:8082/ 
ProxyPass /idm/ https://secureServer.com/ 

相关Apache配置

## 
## SSL Virtual Host Context 
## 
NameVirtualHost *:443 

<VirtualHost _default_:443> 
    DocumentRoot "/usr/local/apache2/htdocs" 
# ServerName websiteAndProxyServer.com 
# ServerAlias www.dummy-host.example.com 
    ErrorLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/localhost/error_log.%Y-%m-%d 86400" 
    CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/localhost/access_log.%Y-%m-%d 86400" vcombined2 
    RewriteEngine on 
    RewriteOptions inherit 

# SSL Engine Switch: 
# Enable/Disable SSL for this virtual host. 
#SSLEnable #I get an error if this is un-commented 
SSLEngine on 
SSLProxyEngine on 

# SSL Cipher Suite: 
# List the ciphers that the client is permitted to negotiate. 
# See the mod_ssl documentation for a complete list. 
SSLCipherSuite DEFAULT:!ADH::RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:+eNULL 

# Server Certificate: 
# Point SSLCertificateFile at a PEM encoded certificate. If 
# the certificate is encrypted, then you will be prompted for a 
# pass phrase. Note that a kill -HUP will prompt again. Keep 
# in mind that if you have both an RSA and a DSA certificate you 
# can configure both in parallel (to also allow the use of DSA 
# ciphers, etc.) 
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt 
#SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server-dsa.crt 

SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/iam.crt 
#SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/server.crt 

我试过从目标网址获取证书,并通过上面的iam.crt参考引用它们。这似乎没有什么区别。

通过上述配置,我回来了以下内容:

<?xml version='1.0' ?> 
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> 
<env:Body> 
<env:Fault> 
<faultcode>env:Client</faultcode> 
<faultstring>Internal Error</faultstring> 
</env:Fault> 
</env:Body> 
</env:Envelope> 

注意,HTTP代码中,我得到的回复是200。当我发出了类似的请求通过了SoapUI上述终点,我获得了成功回来,所以它必须与我的配置或权限有关。有没有其他的配置,我错过了?

任何建议表示赞赏。

回答

0

事实证明,我的配置完全没有问题。相反,我的肥皂请求格式不正确。我没有将请求包含在肥皂信封中。进行此更改后,请求恢复正常。

旧请求:

<?xmlversion="1.0"encoding="UTF-8"standalone="yes"?> 
<accountCreateRequestxmlns="http://schemaSite.com/schema/"> 
     <namespaceId>50000003</namespaceId> 
     <emailAddress>[email protected]</emailAddress> 
     <password>infdafs</password> 
     <generateLoginName>false</generateLoginName> 
     <loginName>[email protected]</loginName> 
     <securityQuestion></securityQuestion> 
     <securityAnswer></securityAnswer> 
     <securityLevel>LOW</securityLevel> 
</accountCreateRequest> 

新要求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mes="http://schemaSite.com/messages/"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <mes:accountCreateRequest> 
     <mes:namespaceId>50000003</mes:namespaceId> 
     <mes:emailAddress>[email protected]</mes:emailAddress> 
     <mes:password>!fdsuit01</mes:password> 
     <mes:generateLoginName>false</mes:generateLoginName> 
     <mes:loginName>[email protected]</mes:loginName> 
     <mes:securityQuestion></mes:securityQuestion> 
     <mes:securityAnswer></mes:securityAnswer> 
     <mes:securityLevel>LOW</mes:securityLevel> 
     </mes:accountCreateRequest> 
    </soapenv:Body> 
</soapenv:Envelope> 
相关问题