Welcome! Log In Create A New Profile

Advanced

Re: Help - Nginx Azure Auth

Pavan P
November 25, 2020 11:28PM
Hi Harish,
Below is the config of my nginx. Https module is configured fine. Please
let me know if I have missed anything.

server {
server_name ci1.altlifelab.com;

location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;


# Fix the "It appears that your reverse proxy set up is broken" error.
proxy_pass http://127.0.0.1:9080;
proxy_read_timeout 90;

proxy_redirect http://127.0.0.1:9080
http://www.ci1.altlifelab.com;

# Required for new HTTP-based CLI
proxy_http_version 1.1;
proxy_request_buffering off;
# workaround for https://issues.jenkins-ci1.org/browse/JENKINS-45651
add_header 'X-SSH-Endpoint' 'ci1.altlifelab.com:50022' always;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/ci1.altlifelab.com/fullchain.pem;
# managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ci1.altlifelab.com/privkey.pem;
# managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

server {
if ($host = ci1.altlifelab.com) {
# return 301 https://$host$request_uri;
return 301
https://myapps.microsoft.com/signin/ci2/a825dd26-fed2-4423-ae69-6a7d457b4b44?tenantId=eb9970cc-4803-4f6a-9ad2-e9b46042c5fd
;
} # managed by Certbot


listen 80;
server_name ci1.altlifelab.com;
return 301
https://myapps.microsoft.com/signin/ci2/a825dd26-fed2-4423-ae69-6a7d457b4b44?tenantId=eb9970cc-4803-4f6a-9ad2-e9b46042c5fd;

}

On Thu, Nov 26, 2020 at 5:04 AM HARISH KUMAR Ivaturi <
harishkumarivaturi@gmail.com> wrote:

> I am not sure if you have configured nginx with https_module. Once try
> that. And also add proper headers in the nginx.conf like
>
> Listen 443 ssl;
> Certificates location
>
> BR
> Harish Kumar
>
> On Wed 25 Nov, 2020, 3:53 PM Pavan P, <pavan45@gmail.com> wrote:
>
>> Hi,
>> I have configured nginx to authenticate with azure AD for login.
>>
>> When I access the site abc.example.com it redirects to Azure for
>> authentication and redirects me back once the authentication is complete.
>>
>> How ever when I try to access the site with https abc.example.com it
>> does not redirect for authentication.
>>
>> Is there anyway I can get both http and https to redirect for azure auth.
>>
>> Regards,
>> Pavan
>>
>> _______________________________________________
>> nginx-devel mailing list
>> nginx-devel@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Help - Nginx Azure Auth

Pavan P 439 November 25, 2020 09:54AM

Re: Help - Nginx Azure Auth

HARISH KUMAR Ivaturi 124 November 25, 2020 06:36PM

Re: Help - Nginx Azure Auth

Pavan P 134 November 25, 2020 11:28PM

Re: Help - Nginx Azure Auth

HARISH KUMAR Ivaturi 143 November 26, 2020 12:14AM

Re: Help - Nginx Azure Auth

Pavan P 129 November 26, 2020 12:18AM

Re: Help - Nginx Azure Auth

HARISH KUMAR Ivaturi 140 November 26, 2020 12:44AM

Re: Help - Nginx Azure Auth Attachments

HARISH KUMAR Ivaturi 182 November 26, 2020 12:50AM

Re: Help - Nginx Azure Auth

Pavan P 163 November 26, 2020 12:56AM

Re: Help - Nginx Azure Auth

Pavan P 151 November 26, 2020 01:10AM

Re: Help - Nginx Azure Auth

HARISH KUMAR Ivaturi 147 November 26, 2020 01:18AM

Re: Help - Nginx Azure Auth

Pavan P 220 November 26, 2020 01:22AM



Sorry, you can't reply to this topic. It has been closed.

Online Users

Guests: 184
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready