XF 2.3 Xenforo Friendly Url for Windows Ngnix

Itworx4me

Well-known member
Hello,
I am looking for a nginx windows setup for friendly urls. I am using Laragon with a nginx configuration. Does anyone have a setup for friendly urls?

Code:
location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location ^~ /xf/install/data/ {
    internal;
}
location ^~ /xf/install/templates/ {
    internal;
}
location ^~ /xf/internal_data/ {
    internal;
}
location ^~ /xf/library/ { #legacy
    internal;
}
location ^~ /xf/src/ {
    internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}
How does one get this to work on nginx windows?

Thanks,
Itworx4me
 
You put this in your conf file for your domain on NGINX.
You need to adjust the path where it says /xf/ to whatever path you are using.

If your site is in the root, just change it to / (removing xf/).
If your site is a sub folder, change it to /subfolder/ ... etc.
 
You put this in your conf file for your domain on NGINX.
You need to adjust the path where it says /xf/ to whatever path you are using.

If your site is in the root, just change it to / (removing xf/).
If your site is a sub folder, change it to /subfolder/ ... etc.
The configuration above doesn't work for Windows Nginx setup. Its meant for a linux server setup. I am looking for a Windows Ngnix setup. I used the above code as a reference.
 
The configuration above doesn't work for Windows Nginx setup. Its meant for a linux server setup. I am looking for a Windows Ngnix setup. I used the above code as a reference.
Ah, Windows. 😐
Then it would be something like C:\\path\\to\\xf; ...or something along those lines.
I don't know the answer for the php processor though, but I'm sure there's an answer out there.
 
Back
Top Bottom