Learn about Centmin Mod LEMP Stack today
Become a Member

Redirect root to folder

Discussion in 'System Administration' started by elargento, Aug 3, 2017.

  1. elargento

    elargento Member

    284
    16
    18
    Jan 4, 2016
    Ratings:
    +37
    Local Time:
    5:52 PM
    10
  2. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    6:52 AM
    Nginx 1.13.x
    MariaDB 5.5
    have you read Avoid landing page redirects | GTmetrix ? you are doing exactly what they said not to do = on landing page doing a redirect. The solution is moving /folder site to web root of site at / if that is the main landing page content you want to serve when someone accesses /
     
  3. elargento

    elargento Member

    284
    16
    18
    Jan 4, 2016
    Ratings:
    +37
    Local Time:
    5:52 PM
    10
    Suppose I want my forum to be in community folder, how can I do it so? I don't want to create a landing page with just a button linking to community folder
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    6:52 AM
    Nginx 1.13.x
    MariaDB 5.5
    Then just advertise the forum url not main domain. As the article says, if you need to do a redirect then do it. It doesn't say not to do it ever :)

    I prefer subdomain rather than folder myself. It allows me to host forums on separate server from main site i.e. centminmod.com vs community.centminmod.com to only scale one server/site when needed.
     
    • Like Like x 1
    • Agree Agree x 1
  5. elargento

    elargento Member

    284
    16
    18
    Jan 4, 2016
    Ratings:
    +37
    Local Time:
    5:52 PM
    10
    How you deal in case of letencrypt? Do you have to ask for a new certificate per vhost/subdomain?
     
  6. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    6:52 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yes in letsencrypt and centmin mod if separate nginx vhost you get separate letsencrypt ssl certs one for domain.com and one for forum.domain.com. But for my centminmod.com sites and subdomain, I use Comodo paid SSL wildcard SSL cert so doesn't matter as I am covered for *.centminmod.com :)

    upload_2017-8-3_22-50-2.png
     
  7. elargento

    elargento Member

    284
    16
    18
    Jan 4, 2016
    Ratings:
    +37
    Local Time:
    5:52 PM
    10
    It is the same, any particular reason to don't use LE?
     
  8. eva2000

    eva2000 Administrator Staff Member

    29,016
    6,584
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,774
    Local Time:
    6:52 AM
    Nginx 1.13.x
    MariaDB 5.5
    I have 100s of subdomains off of my domains, so SSL wildcard is easier to use and allows me to spin up subdomains at will all on the cost of a single SSL wildcard and since I also use load balanced server clusters, can provision SSL wildcard easier as Letsencrypt needs to validate each domain to a specific server IP.
     
    • Like Like x 1