Join the community today
Become a Member

Xenforo Xenforo and Nginx when installation directory is underneath public folder

Discussion in 'Forum software usage' started by binventive, Feb 21, 2018.

  1. binventive

    binventive New Member

    6
    2
    3
    Feb 14, 2018
    Ratings:
    +2
    Local Time:
    3:12 AM
    Latest via latest Centmin beta
    MariaDB 10
    Please fill in any relevant information that applies to you:
    • CentOS Version: Centos 7 64 Bit
    • Centmin Mod Version Installed: Latest beta as of about a week ago
    • Nginx Version Installed: 1.13.8
    • PHP Version Installed: 7.2.2
    • MariaDB MySQL Version Installed: 10.1.31
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: No Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ?
    I have installed Xenforo 2.0.2 in /home/nginx/domain/mydomain.com/public/community. When I go to my web site, the index.html from the public directory keeps being used. I want the default path to be https://mydomain.com/community rather than MyDomain | Domain Names, Web Hosting, and Free Domain Services, so Xenforo is referenced rather than the index.html in the public directory. Is it required that I complete the steps described for nginx at the link below at a minimum? If so, it does not seem to make any difference.
    Friendly URLs | XenForo

    I have looked at the information at the link below, but I want to start out simple and see if I can get things working correctly before I do additional step(s).

    Nginx Rewrites for Xenforo Friendly Urls - CentminMod.com LEMP Nginx web stack for CentOS
     
  2. eva2000

    eva2000 Administrator Staff Member

    34,598
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,770
    Local Time:
    5:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  3. binventive

    binventive New Member

    6
    2
    3
    Feb 14, 2018
    Ratings:
    +2
    Local Time:
    3:12 AM
    Latest via latest Centmin beta
    MariaDB 10
    Thanks for the reply. I have looked at the Xenforo Friendly URLs link, but I found other references that indicated that some of the information there should no longer be used. I also looked at Nginx Rewrites for Xenforo Friendly Urls - CentminMod.com LEMP Nginx web stack for CentOS and I have tried to update the mydomain.ssl.conf file with a basic configuration based on some information I found on that page. See below. It is not working. I am thinking I might have to put the Xenforo installation in the public folder rather than in public/community, if I can't get this working fairly soon.

    Code:
            location /community/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /community/index.php?$uri&$args;
    
            }
    
            location /community/internal_data/ {
            internal;
            allow 127.0.0.1;
            allow 0.0.0.0;
            deny all;
            }
    
            location /community/library/ {
            internal;
            allow 127.0.0.1;
            allow 0.0.0.0;
            deny all;
            }
     
  4. eva2000

    eva2000 Administrator Staff Member

    34,598
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,770
    Local Time:
    5:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    after editing did you restart nginx server ?
    Code (Text):
    ngxrestart
    

    Or
    Code (Text):
    service nginx restart
    

    can you elaborate ?
     
  5. binventive

    binventive New Member

    6
    2
    3
    Feb 14, 2018
    Ratings:
    +2
    Local Time:
    3:12 AM
    Latest via latest Centmin beta
    MariaDB 10
  6. eva2000

    eva2000 Administrator Staff Member

    34,598
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,770
    Local Time:
    5:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    fyi, if you don't want your domain name parsed in posts, you can wrap them in PLAIN bbcode tags [PLAIN][/PLAIN] ;)

    If you want https://domain.com/ to show your forums, you need to have installed Xenforo files in web root of your domain at /home/nginx/domains/domain.com/public. By installing at /home/nginx/domains/domain.com/public/community/ your forum would be located at https://domain.com/community
     
  7. binventive

    binventive New Member

    6
    2
    3
    Feb 14, 2018
    Ratings:
    +2
    Local Time:
    3:12 AM
    Latest via latest Centmin beta
    MariaDB 10
    That is exactly what is happening! I can get to the Xenforo site by going to https://www.mydomain.com/community. I was perhaps taking the line below from the Xenforo 2 installation documentation a bit to literally (and assuming that since pages are already being displayed from the public folder, I should not install Xenforo there). Anyway, I was going to try and install into the public folder (rather than attempt to have it in public/community), so that is what I will now do. Thanks for your help.

    upload_2018-2-20_14-42-29.png
     
    • Like Like x 1
  8. binventive

    binventive New Member

    6
    2
    3
    Feb 14, 2018
    Ratings:
    +2
    Local Time:
    3:12 AM
    Latest via latest Centmin beta
    MariaDB 10
    It works find after I installed the Xenforo 2 into public rather than into public/community. Thanks again for helping me "think" through the process more clearly.
     
    • Like Like x 1
  9. eva2000

    eva2000 Administrator Staff Member

    34,598
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,770
    Local Time:
    5:12 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Glad to hear :)
     
..