Configure nginx a reverse proxy https for IIS backend

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Configure nginx a reverse proxy https for IIS backend

Johan Gabriel Medina Capois

Hello everyone

 

We are noob on nginx and we are trying to configure a site that is in Windows IIS, we could configure the site with http:// but with https:// we can’t

 

IIS Backend server

10.228.20.113 application running on port 80 and 443

 

Nginx reverse proxy

10.228.20.99

Version 1.17.9 on ubuntu bionic

 

This is our config files

 

nginx.conf

 

user  nginx;

worker_processes  auto;

 

error_log  /var/log/nginx/error.log warn;

pid        /var/run/nginx.pid;

 

 

events {

    worker_connections  1024;

}

 

 

http {

    include       /etc/nginx/mime.types;

    default_type  application/octet-stream;

 

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

                      '$status $body_bytes_sent "$http_referer" '

                      '"$http_user_agent" "$http_x_forwarded_for"';

 

    access_log  /var/log/nginx/access.log  main;

 

    sendfile        on;

    #tcp_nopush     on;

 

    keepalive_timeout  65;

 

    #gzip  on;

 

    include /etc/nginx/conf.d/*.conf;

}

 

HTTP site config

 

server {

listen 80;

server_name dev-kronos.mardom.com;

    location / {

   proxy_pass http://10.228.20.113;

 

proxy_max_temp_file_size 0;

}

}

 

HTTPS site config

server {

listen 443;

server_name dev-kronos.mardom.com;

location / {

proxy_pass https://10.228.20.113;

 

proxy_ssl_certificate /etc/nginx/certificados/dev-kronoscerts/cert.crt;

proxy_ssl_certificate_key /etc/nginx/certificados/dev-kronoscerts/key.rsa;

 

}

}

 

Could you help us please

 

Regards

 

 

Johan Medina
Administrador de Sistemas e Infraestructura
Logo
 
Departamento: TECNOLOGIA
Central Tel: 809-539-600 Ext: 8139
Flota: (809) 974-4954
Directo: 809 974-4954
Email: [hidden email]
Web:www.mardom.com
 
Facebook icon Instagram icon Linkedin icon Youtube icon
 
Banner
 
Sea amable con el medio ambiente: no imprima este correo a menos que sea completamente necesario.

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Configure nginx a reverse proxy https for IIS backend

Aleksandar Lazic
Hi.

On 07.04.20 03:52, Johan Gabriel Medina Capois wrote:
> Hello everyone
>
> We are noob on nginx and we are trying to configure a site that is in Windows IIS, we could configure the site with http:// but with https:// we can’t

What's in the nginx and IIS error log?

> IIS Backend server
>
> 10.228.20.113 application running on port 80 and 443
>
> Nginx reverse proxy
>
> 10.228.20.99
>
> Version 1.17.9 on ubuntu bionic
>
> This is our config files
>
> nginx.conf

[snipp]

> HTTP site config

[snipp]

> HTTPS site config
>
> server {
>
> listen 443;

This does not looks to a proper TLS/SSL setup.
http://nginx.org/en/docs/http/configuring_https_servers.html

> server_name dev-kronos.mardom.com;
>
> location / {
>
> proxy_pass https://10.228.20.113;
>
> proxy_ssl_certificate /etc/nginx/certificados/dev-kronoscerts/cert.crt;
>
> proxy_ssl_certificate_key /etc/nginx/certificados/dev-kronoscerts/key.rsa;
>
> }
>
> }
>
> Could you help us please
>
> Regards
>
> Johan Medina
> Administrador de Sistemas e Infraestructura Logo
> Departamento: *TECNOLOGIA*
> Central Tel: 809-539-600 *Ext: 8139*
> Flota: *(809) 974-4954*
> Directo: *809 974-4954*
> Email: *[hidden email]*
> Web:*www.mardom.com <https:://www.mardom.com>*
> Facebook icon <https://www.facebook.com/maritimadelcaribe>Instagram icon <https://www.instagram.com/maritimadelcaribe>Linkedin icon <https://www.linkedin.com/company/maritima-dominicana-sas/?viewAsMember=true>Youtube icon
> Banner
> Sea amable con el medio ambiente: no imprima este correo a menos que sea completamente necesario.
>
>
> _______________________________________________
> nginx mailing list
> [hidden email]
> http://mailman.nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

RE: Configure nginx a reverse proxy https for IIS backend

Johan Gabriel Medina Capois
Thank for your interest

We make it run well, the request parameter missing was

ignore_invalid_headers off;

Regards

-----Original Message-----
From: Aleksandar Lazic <[hidden email]>
Sent: Tuesday, April 7, 2020 5:52 PM
To: [hidden email]; Johan Gabriel Medina Capois <[hidden email]>
Subject: Re: Configure nginx a reverse proxy https for IIS backend

Hi.

On 07.04.20 03:52, Johan Gabriel Medina Capois wrote:
> Hello everyone
>
> We are noob on nginx and we are trying to configure a site that is in
> Windows IIS, we could configure the site with http:// but with
> https:// we can’t

What's in the nginx and IIS error log?

> IIS Backend server
>
> 10.228.20.113 application running on port 80 and 443
>
> Nginx reverse proxy
>
> 10.228.20.99
>
> Version 1.17.9 on ubuntu bionic
>
> This is our config files
>
> nginx.conf

[snipp]

> HTTP site config

[snipp]

> HTTPS site config
>
> server {
>
> listen 443;

This does not looks to a proper TLS/SSL setup.
http://nginx.org/en/docs/http/configuring_https_servers.html

> server_name dev-kronos.mardom.com;
>
> location / {
>
> proxy_pass https://10.228.20.113;
>
> proxy_ssl_certificate
> /etc/nginx/certificados/dev-kronoscerts/cert.crt;
>
> proxy_ssl_certificate_key
> /etc/nginx/certificados/dev-kronoscerts/key.rsa;
>
> }
>
> }
>
> Could you help us please
>
> Regards
>
> Johan Medina
> Administrador de Sistemas e Infraestructura Logo
> Departamento: *TECNOLOGIA*
> Central Tel: 809-539-600 *Ext: 8139*
> Flota: *(809) 974-4954*
> Directo: *809 974-4954*
> Email: *[hidden email]*
> Web:*www.mardom.com <https:://www.mardom.com>* Facebook icon
> <https://www.facebook.com/maritimadelcaribe>Instagram icon
> <https://www.instagram.com/maritimadelcaribe>Linkedin icon
> <https://www.linkedin.com/company/maritima-dominicana-sas/?viewAsMember=true>Youtube icon Banner Sea amable con el medio ambiente: no imprima este correo a menos que sea completamente necesario.
>
>
> _______________________________________________
> nginx mailing list
> [hidden email]
> http://mailman.nginx.org/mailman/listinfo/nginx
>

Johan Medina
Administrador de Sistemas e Infraestructura       [Logo]

Departamento: TECNOLOGIA
Central Tel: 809-539-600 Ext: 8139
Flota: (809) 974-4954
Directo: 809 974-4954
Email: [hidden email]
Web:www.mardom.com<https:://www.mardom.com>

[Facebook icon] <https://www.facebook.com/maritimadelcaribe> [Instagram icon]  <https://www.instagram.com/maritimadelcaribe> [Linkedin icon]  <https://www.linkedin.com/company/maritima-dominicana-sas/?viewAsMember=true> [Youtube icon]

[Banner]

Sea amable con el medio ambiente: no imprima este correo a menos que sea completamente necesario.
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx