0

I have several domain names, and I want redirect all of them to https://indi-ticket.fr

I have configured Nginx and all the request from http://other-domain.xx are redirected to htpps://indi-ticket.fr but not these from https://other-domain.xx.

Here is the relevant part of my Nginx conf:

server {
        listen         80;
        server_name
                www.indi-ticket.fr
                indi-ticket.fr
                www.indi-tickets.fr
                indi-tickets.fr
                www.indi-ticket.com
                indi-ticket.com;
        return 301 https://indi-ticket.fr$request_uri;
}

server {
    listen 443 ssl;
    server_name indi-ticket.fr;

    ssl on;
    ...

What is wrong with this conf? What curl -I -L https://indi-tickets.fr does not redirect to https://indi-ticket.fr?

1 Answer 1

1

https://indi-tickets.fr is using HTTPS, which means it's hitting port 443, not port 80. Your port 443 config doesn't do any redirecting. It's possible to have a combined server block that handles both.

1
  • 1
    Note that without including the appropriate key information in the server block or having a wildcard cert for the server, browsers will stop on untrusted warnings. I believe the redirect is sent after negotiation.
    – Paul
    Nov 8, 2016 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .