Nginx - redirected you too many times

Hi, I'm using Ubuntu 18.04 LTS and I setup LEMP stack using Webinoly. I uploaded an existing wordpress website and enabled SSL using site domain.com -ssl-on. But I'm getting the error "domain.com redirected you too many times." Here's my nginx configuration.

    server {
            listen 80;
            listen [::]:80;
            server_name iflytravelsolutionsinc.com www.iflytravelsolutionsinc.com;
            return 301 https://$host$request_uri;
    }

    server {
            listen 443 ssl http2 default_server;
            listen [::]:443 ssl http2 default_server;

            server_name iflytravelsolutionsinc.com www.iflytravelsolutionsinc.com;

            # WebinolySSLstart
            ssl_certificate /etc/letsencrypt/live/iflytravelsolutionsinc.com/fullchain.pem;
            ssl_certificate_key /etc/letsencrypt/live/iflytravelsolutionsinc.com/privkey.pem;
            ssl_stapling on;
            ssl_stapling_verify on;
            ssl_trusted_certificate /etc/letsencrypt/live/iflytravelsolutionsinc.com/chain.pem;
            # WebinolySSLend
            access_log /var/log/nginx/iflytravelsolutionsinc.com.access.log we_log;
            error_log /var/log/nginx/iflytravelsolutionsinc.com.error.log;

            root /var/www/iflytravelsolutionsinc.com/htdocs;

            index  index.php index.html index.htm;

            include common/php.conf;
            include common/wpcommon.conf;
            include common/locations.conf;
            include common/headers-http.conf;
            include common/headers-https.conf;
            include common/headers-html.conf;
            include /var/www/iflytravelsolutionsinc.com/*-nginx.conf;
    }           

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct