reverse proxy
Edho Arief
edho at myconan.net
Tue Dec 11 09:18:49 UTC 2012
On Tue, Dec 11, 2012 at 3:58 PM, Dinoosh Nikapitiya
<dinoosh.niki at gmail.com> wrote:
> Hi all,
>
> I configured an nginx server as a reverse proxy few months ago. i have
> apache server as a back end of the reverse proxy. Every thing worked well
> until i start to use ssl.
>
> When i try to redirect https://mydomain.com to https://www.mydomain.com it
> gives me ssl untrusted error.
>
SSL is handled by nginx and not usually passed at all to backend. The
error probably caused by nginx serving certificate for mydomain.com
but the browser is accessing www.mydomain.com. Domain mismatch raises
the error.
Put a certificate for www.mydomain.com instead which usually already
includes mydomain.com (depends on the provider) or create separate
server block which has certificate for each domain (which probably
better since it will skip backend entirely for the redirect).
> When i check HTTP_X_URL_SCHEME on backend server it shows only http.
> Backend cannot understand if it is a http or https header.
>
How did you check it? Have you tried hardcoding https to the proxy set header?
More information about the nginx
mailing list