Learn about Centmin Mod LEMP Stack today
Register Now

Xenforo Yet another "Friendly urls 404" post

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

  1. modder

    modder New Member

    24
    1
    3
    Dec 6, 2019
    Ratings:
    +3
    Local Time:
    6:07 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

    43,579
    9,885
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,265
    Local Time:
    8:07 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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;
    
     
    • Like Like x 1
  3. modder

    modder New Member

    24
    1
    3
    Dec 6, 2019
    Ratings:
    +3
    Local Time:
    6:07 PM
    It works. Thanks a lot!