Setup SEO Full Friendly URLs on nginx

Status
Not open for further replies.

mlx

OMG Member
Joined
Sep 9, 2008
Messages
39
It's actually really really simple.

Considering you have uploaded XenForo into the directory "community", just add this to your nginx config:
Code:
        location /community/ {
            index  index.php index.html index.htm;
            try_files   $uri $uri/ /community/index.php?$uri&$args;
        }

While you are at it you might also want to add this to block external access to the folders "internal_data" and "library".
Code:
        location ~ ^/community/(internal_data|library)/(.*)$ {
            internal;
        }

Restart nginx and enable Full Friendly URLs.
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,101
mlx, maybe from 2011 on we can run xenfans here on nginx - rather than apache2. :)
Thanks for this resource, I've bookmarked it :D
 

mlx

OMG Member
Joined
Sep 9, 2008
Messages
39
I have updated the 1st post. Using try_files is apparently better than using if.
 
Status
Not open for further replies.
Top