Welcome to Centmin Mod Community
Register Now

IP.Board Proper Nginx rule when forum is inside a folder

Discussion in 'Forum software usage' started by pamamolf, Jul 19, 2019.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,405
    320
    83
    May 31, 2014
    Ratings:
    +608
    Local Time:
    6:43 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    I would like to ask what rule do you use for Nginx to get the forum working if it is on a folder like:

    Code:
    /home/nginx/domains/mydomain.com/public/forum/
    Do you adjust also the root path at Nginx config ?

    @Jimmy
    Maybe you can help also as you are using Invision?

    Thank you
     
  2. Jimmy

    Jimmy Well-Known Member

    1,570
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +811
    Local Time:
    11:43 AM
    1.15.x
    MariaDB 10.3.x
    Yes, you would have to set the root to that folder.
     
    • Informative Informative x 1
  3. eva2000

    eva2000 Administrator Staff Member

    41,088
    9,194
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,104
    Local Time:
    1:43 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    using
    Code (Text):
    location /forum {
     your code
    }

    doesn't work ?
     
  4. Jimmy

    Jimmy Well-Known Member

    1,570
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +811
    Local Time:
    11:43 AM
    1.15.x
    MariaDB 10.3.x
    I believe you can do it either way depending on what you're trying to do.

    I've never run the forum on /forum but if someone wants to only have the forum on their site and nothing in the / then I believe you'd have to set the root as /forum, otherwise the location /forum would be used.
     
    • Agree Agree x 1
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,405
    320
    83
    May 31, 2014
    Ratings:
    +608
    Local Time:
    6:43 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Don't know what to use there:

    Code:
    location /forums {
      try_files    $uri $uri/ /forums/index.php;
    }
    or

    Code:
    location /forum/ {
      rewrite ^/forum/(.*)$ /forum/index.php;
    }
    All that confusing me :)
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,088
    9,194
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,104
    Local Time:
    1:43 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    1st one
     
    • Informative Informative x 1