How to configure Apache server to talk to https backend server?
A client must be able to read both the HTTP and HTTPS protocols. It cannot have a certificate for one protocol (either SSL, where the certificate contains the web site's URL, or a self-signed certificate) and another certificate on the same domain that it can read; it must be able to read both. Thus, if there are two certificates on a single web site, each of them must be marked as having a different subject.
In Apache, modssl is used to provide a "strict" certificate store; either you can use that to set up a secure environment for the client with a single certificate - you need to read up on this topic (search for "modssl"). Or you can provide your own store with a simple configuration file.
Alternatively, you could give up all HTTPS and just serve unencrypted URLs. Of course, that's not really secure either, but unless you have other concerns beyond a "certificate chain" problem, that is not an option either.
Update: If the client will always be sending SSLv2 cipher suites, perhaps the answer to your problem is to simply not use SSLv2; that was in its day quite an insecure protocol. That being said, SSLv2 is deprecated, so it's unlikely that your clients will still be using that.
How can I use Apache as a reverse proxy for https?
As seen on this question, one way to get https on port 443 without setting up SSL/TLS certificate for nginx or haproxy is to use Apache's modproxy module. But my application requires the https:// part of the URL to work. To make it clear, is fine, but is not working. The error that I get when requesting is: ERRCONNECTIONREFUSED (I also tried using /hello/foo).
in this scenario? Do I have to add any config file or anything? You may have to enable the http hostname in your virtual host file.
Can Apache do reverse proxy?
In this article, we'll learn how to create an Apache reverse proxy configuration. We'll use ProxyPass and ProxyPassReverse to enable reverse proxying.
What is a reverse proxy? Reverse proxy is a server that acts as an intermediary between client and back-end application, allowing the clients to talk directly to the application, but through the reverse proxy instead of directly. For example, let's say that you have an web application running in your server, and you want to access it from the public internet using a different domain name, such as www.com. In order to do that, you would need to setup a reverse proxy. This proxy will be able to intercept the requests that are made to www.com, and then, based on the domain name used, redirect the traffic to the appropriate server.
There are a few types of reverse proxies that you can use, but the two most popular ones are Nginx and Apache. For example, if you'd like to use Nginx as a reverse proxy, you could set up a Varnish server (also called a caching reverse proxy), to fetch the content from the back-end web application and cache it for a while. If you want to setup a reverse proxy using Apache, you can go ahead and install modproxyhttpd module.
Before we proceed, there's some other important terminology that you should know: Client is a computer user that is accessing the reverse proxy server. Proxy Pass/ProxyPassReverse are directives that allow us to define where traffic will be forwarded. Proxy Server is the actual reverse proxy server software. Back-end server is the one that you wish to forward requests to. Proxy Pass/ProxyPassReverse Example. ProxyPass is used to map a URL to another. It uses the syntax below: ProxyPass /foo. When a request comes to the ProxyPass directive, it will be routed to the foo.com server (assuming it's defined as the back-end server). Notice that the path is specified with / instead of the HTTP path, which means that the request won't be redirected if the URI doesn't start with a /.
Similarly, ProxyPassReverse will be used to route the incoming traffic to another server.
Related Answers
What are the two types of proxies?
You can use a reverse proxy for multiple reasons, but mostly it is us...
Does Apache support reverse proxy?
I have a.war application which is deployed in the Tomcat server. br...
Why is it called a reverse proxy?
What is the difference between a reverse proxy an...