Join the community today
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

    40
    3
    8
    Dec 6, 2019
    Ratings:
    +6
    Local Time:
    1:28 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

    44,448
    10,154
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,711
    Local Time:
    3:28 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;
    
     
  3. modder

    modder Member

    40
    3
    8
    Dec 6, 2019
    Ratings:
    +6
    Local Time:
    1:28 PM
    It works. Thanks a lot!