I am creating a simple proxy pass in Apache 2.2 on CentOS 6 but that's not working and throwing error. I would be thankful if someone can please help:

SSLProxyEngine On
ProxyPass  /  https://ecuo-test.fin.us2.oraclecloud.com/
ProxyPassReverse  /  https://ecuo-test.fin.us2.oraclecloud.com/

Now when I call it as http://MyHostName/finApInvQuickInvoicesModel/InvoiceInterfaceService?wsdl it throws following error:

Invalid URL  The requested URL
"http://%5bNo%20Host%5d/finApInvQuickInvoicesModel/InvoiceInterfaceService?", is invalid. Reference #9.76fd241.1465372087.68aff0d

Whereas https://ecuo-test.fin.us2.oraclecloud.com/finApInvQuickInvoicesModel/InvoiceInterfaceService?wsdl works very fine.

Can you please help me fixing this?


At a guess, you might need to turn on ProxyPreserveHost. (Docs are here)

Without it, the proxy-request that Apache is making to ecuo-test.fin.us2.oraclecloud.com will have a Host header of MyHostName, and I guess that the error is trying to indicate that the eventual host doesn't recognise that host name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.