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

XF 1.4 Nginx Friendly URLs

Discussion in 'Troubleshooting and Problems' started by sambish20, Jul 12, 2015.

  1. sambish20

    sambish20 Member


    I recently took the chance to move my current site from Apache over to Nginx. So far the installation has gone smoothly and everything is working but one thing: Friendly URLs. I understand that on Apache you'd use a .htaccess file to complete this, but on Nginx it is different. I feel as something is configured wrong, or I have placed this content in the wrong file. At /etc/nginx/sites-available/default I have the following config. Any ideas as to why it doesn't work?

  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. sambish20

    sambish20 Member

    I saw that, would that be because I didn't include this then?

    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  4. Mike

    Mike XenForo Developer Staff Member

    I don't actually see any part of the recommended config in the config that you provided. You have a try_files line, but it's different from what's needed (it doesn't try index.php).
    sambish20 likes this.

Share This Page