Want more timely Centmin Mod News Updates?
Become a Member

Xenforo Yet another "Friendly urls 404" post

Discussion in 'Forum software usage' started by modder, Mar 9, 2020.

  1. modder

    modder Member

    124
    16
    18
    Dec 6, 2019
    Ratings:
    +27
    Local Time:
    6:20 PM
    I set up my SSL website without a problem. (SSL - SSL thing set up. It works. But is it really secure? Or I miss something important?)

    I tried to use Full Friendly URLs for my xenForo but it doesn't work.


    I installed the xenforo in /public/forum directory. I enabled the Use full friendly URLs option in xenForo admin page.

    I followed NGINX REWRITES FOR XENFORO FRIENDLY URLS.

    I added the following lines in the server block in mydomain.com.ssl.conf file:


    Code (Text):
            location /forum/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$uri&$args;
    
            }
    
            location /forum/install/data/ {
            internal;
            }
    
            location /forum/install/templates/ {
            internal;
            }
    
            location /forum/internal_data/ {
            internal;
            }
    
            location /forum/library/ {
            internal;
            }
    
            # xenforo 2 uncomment / remove hash from next 3 lines
            location /forum/src/ {
            internal;
            }
    


    Run ngxrestart

    It shows the page correctly for mydomain.com/forum, but when I click on a node (main forum in this case), the URL becomes https://mydomain.com/forum/forums/main-forum.2/ and it shows me the 404 error. It's the same for https://mydomain.com/forum/search/

    Can anyone help please?
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    8:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    missed one part

    change from
    Code (Text):
    try_files $uri $uri/ /index.php?$uri&$args;
    

    to
    Code (Text):
    try_files $uri $uri/ /forum/index.php?$uri&$args;
    
     
  3. modder

    modder Member

    124
    16
    18
    Dec 6, 2019
    Ratings:
    +27
    Local Time:
    6:20 PM
    It works. Thanks a lot!