Too many redirects error with Unit

Danny Horne danny at trisect.uk
Thu Jun 21 18:31:30 UTC 2018


Hi,

Previously I've been running Nginx + php-fpm on a Fedora 28 box, this
has run fine.  For various reasons I want to migrate to Nginx + Unit,
and because I haven't been able to install this on Fedora 28 (have no
intention of compiling, install has to be through repos) I've set up a
CentOS 7.5 box to migrate to.

Static http / php pages work fine, but my sites redirect from http to
https (config below) and I'm now getting 'too many redirects' errors.

Any clues as to what I need to do to fix this?

Relevant Nginx server block config -

server {
        listen 80;
        listen [::]:80;

        server_name randomthoughts.trisect.uk;

        return 301 https://$server_name$request_uri;
}

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

        root /var/www/rt;
        index index.php;

        server_name randomthoughts.trisect.uk;

        location ~ \.php$ {
                proxy_pass http://unit_rt;
                proxy_set_header Host $host;
        }

Relevant Nginx http block config -

        upstream unit_rt {
        server 127.0.0.1:8302;
        }

Thanks for looking


More information about the unit mailing list