Welcome! Log In Create A New Profile

Advanced

IPB3 FURL over nginx

Posted by DarkPepe 
IPB3 FURL over nginx
September 01, 2009 07:25AM
Hi, I'm having several problems to set up Invision Board 3 with the Friendly URL structure under Nginx.

The first problem I have it's the rewrite rules for the FURL system wich are formated for htaccess but not for nginx.. and I really dont know how to convert them:

[code]
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\..+$
RewriteRule . /index.php [L]
</IfModule>
[/code]


Probably my second problem is related with the FURL structure but I cant confirm... some of the links generated by IPB are returning a 502 error page, while the same board over regular apache (without nginx) works flawless...

I really dont want to use apache anymore (resource hog) but Im a bout to crack my head with this rewrite stuff in nginx..

I hope someone can help me :)

Cheers.
Re: IPB3 FURL over nginx
September 05, 2009 04:27AM
Hi DarkPepe,

in your Apache rewrite rules something is missing, because nothing is trailing the index.php, there it just says RewriteRule . /index.php [L] but where is the request going? To which variable do we have to pass the requested URL?

The code here will work for you, but be sure to find out to which variable you have to pass your requested URL or point me to a description page of the FURL thing and I'll have a look at it.
[code]
server {
[...]
# static files won't go through all rewrite rules
if (-f $request_filename) {
break;
}

# the (!-e) rule is similar to the !-f and !-d rule-set from apache
location / {
if (!-e $request_filename) {
# rewrite ^(.*)$ /index.php!!!! HERE MUST BE SOMETHING !!!!$1 last;
# example (this works for Drupal
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
}
[...]
}
[/code]

--------------------------------------------------------------------------------
//richard.fussenegger.info
//movlib.org



Edited 1 time(s). Last edit at 09/05/2009 04:28AM by Fleshgrinder.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready