Subdomain vhost + LE + php fpm redirect loop

Discussion in 'Installation/Configuration' started by Poliman, Jul 26, 2018.

  1. Poliman

    Poliman Member

    I have huge problem with subdomain created under ISP -> subdomain (vhost). I choose PHP-FPM, tick LE SSL and SSL which worked (I don't enable redirect from http to https currently). When I try enter site subdomain.example-domain.com all work fine but when I try https://subdomain.example-domain.com Chrome says that I have redirect loop. There is no problem on php-fcgi but I need php-fpm there. Is it kind of bug or something? If needed I can put contents of needed files.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Does it work if you enable redirect from http to https ?
    Is it the same thing with other browsers?
    Does the browser show more info, like what is redirected to where?
     
  3. Poliman

    Poliman Member

    I checked it on Chrome and Firefox and both produces too many redirects. I tried enable http to https - this same result. Browsers in console [neither Console nor Network tabs] does not show anything except loading files in loop. When I stopped showing logs in browser's console I could see 301 and 307 codes for subdomain address.:)

    PS
    On this server I have example-domain.com with LE and subdomain.example-domain.com (subdomain vhost) with another LE.
     
    Last edited: Jul 27, 2018
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Maybe you do have a redirect loop? Looks like it, except that php-fcgi does not show the redirect loop.
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think you need to check the settings in the main domain website too.
     
  6. Poliman

    Poliman Member

    For me is quite strange why php fpm gives redirect loop but not fastcgi. I saw (copied client files) on the FTP .htaccess file with some settings which look like cpanel or something. Maybe it gives the base of this problem.
    Guys, do you have some idea based on your experience on which things I should look as first?
     
  7. Poliman

    Poliman Member

    I implemented Yetiforce crm. Inside one of config files was http://subdomain.example-domain.com. Inside vhost I have set redirect to https when is http and application code set http, so server saw http and redirect to https. And in damn loop. :p Problem solved.
     

Share This Page