Want to subscribe to topics you're interested in?
Become a Member

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 Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    10:06 PM
    Nginx-1.26.x
    MariaDB 10.6.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,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    3:06 PM
    Yes, you would have to set the root to that folder.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    using
    Code (Text):
    location /forum {
     your code
    }

    doesn't work ?
     
  4. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    3:06 PM
    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.
     
  5. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    10:06 PM
    Nginx-1.26.x
    MariaDB 10.6.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

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    1st one