Welcome! Log In Create A New Profile

Advanced

Re: Double Redirect

Francis Daly
June 19, 2016 07:16PM
On Sun, Jun 19, 2016 at 05:12:27PM -0400, Lebod wrote:

Hi there,

> I'm having an issue with our site. We're trying to redirect all traffic of
> http://example.com to https://www.example.com.
> Testing out our site, what happens is that http://example.com redirects to
> https://example.com which then redirects to https://www.example.com
>
> We also get an error:
> nginx -t
> nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored

That suggests that there is another server{} block in, or included in,
your nginx.conf that you have not shown here.

> server {
> listen 80;
> listen 443 ssl;
> server_name example.com ***IP Address***;
> return 301 https://www.example.com$request_uri;
> }

If http://example.com redirects to https://example.com, then that server{}
is not used for the http://example.com request.

> I was wondering if there was an issue in our setup that's causing the double
> redirect and the error:
> nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored

nginx -T

might show you where the problem is.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Double Redirect

Lebod June 19, 2016 05:12PM

Re: Double Redirect

itpp2012 June 19, 2016 05:16PM

Re: Double Redirect

Lebod June 20, 2016 05:05PM

Re: Double Redirect

itpp2012 June 20, 2016 05:51PM

Re: Double Redirect

Lebod June 20, 2016 05:59PM

Re: Double Redirect

itpp2012 June 20, 2016 06:24PM

Re: Double Redirect

Francis Daly June 19, 2016 07:16PM

Re: Double Redirect

Lebod June 24, 2016 12:45AM

Re: Double Redirect

Francis Daly June 24, 2016 08:32PM

Re: Double Redirect

Lebod June 25, 2016 01:42AM

Re: Double Redirect

Edho Arief June 25, 2016 01:52AM

Re: Double Redirect

Lebod June 25, 2016 05:09PM

Re: Double Redirect

Edho Arief June 25, 2016 10:50PM

Re: Double Redirect

Lebod June 26, 2016 12:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
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