1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Nginx & friendly urls while using a portal

Discussion in 'Troubleshooting and Problems' started by rivacom, Sep 12, 2016.

  1. rivacom

    rivacom Active Member

    I can't seem to get Friendly URL's to work, i've used the below in my config, while my homepage works fine. When I try to get to the forum portion going to /forums/ it instantly returns a 404. I'm using the [Extra] Portal addon for this.

    server {
            server_name revenantgaming.com;
            root /home/revenant/web/revenantgaming.com/public_html;
    location / {
            try_files $uri $uri/ /index.php?$uri&$args;
            index index.php index.html;
    location /internal_data/ {
    location /library/ {
    location ~ \.php$ {
            fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include         fastcgi_params;
    Any ideas?
  2. Mike

    Mike XenForo Developer Staff Member

    I'm not seeing an obvious reason there. Perhaps you haven't reloaded Nginx since making changes.

    I would note that you have an insecure PHP setup though. You need the "try_files $uri =404;" line given here: https://xenforo.com/help/friendly-urls/
  3. rivacom

    rivacom Active Member

    Thanks for the heads up i'll check out the 404 error.

    So the error I see says it's looking for /forums/index.php when my index is in root. But this is because of the portal addon. So the portal loads when you goto root, but /forums/ loads the forum portion(even though the forum is in root).
  4. rivacom

    rivacom Active Member

    I've tried so many variations of this, fresh install of xenforo in root. If I click a forum it's going to site.com/forums/mainforum and I get a 404 error. If nothing above seems wrong, why isn't this working?
  5. Tracy Perry

    Tracy Perry Well-Known Member

    What OS are you using for your server? If CentOS, I'd highly recommend using CentMin. Makes setting up nginx a breeze (in a secure manner) and you can get tons of help on CentMin from @eva2000's site.
    Depending on what you've installed, it might be easier to start a fresh burn of the server OS (after exporting your DB and archiving your current file structure for the site) and saving it locally for importation.
    eva2000 likes this.
  6. rivacom

    rivacom Active Member

    Thanks @Tracy Perry , I was using debian but figure'd i'd give centos a shot. After a couple of frustrating nights(apparently CSF is way too strict, blocking my upload of 15,000 files). I got Centmin loaded with nginx and the works, files restored, database restored. Now the exact same code above works , but never did for debian... not sure but im glad it's working. Thanks for the help!
    Tracy Perry likes this.

Share This Page