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 -ssl-on. But I'm getting the error " redirected you too many times." Here's my nginx configuration.

    server {
            listen 80;
            listen [::]:80;
            return 301 https://$host$request_uri;

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


            # WebinolySSLstart
            ssl_certificate /etc/letsencrypt/live/;
            ssl_certificate_key /etc/letsencrypt/live/;
            ssl_stapling on;
            ssl_stapling_verify on;
            ssl_trusted_certificate /etc/letsencrypt/live/;
            # WebinolySSLend
            access_log /var/log/nginx/ we_log;
            error_log /var/log/nginx/;

            root /var/www/;

            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/*-nginx.conf;

0 Replies


Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct