Welcome! Log In Create A New Profile

Advanced

migrating from apache2 to nginx

Posted by zozo6015 
migrating from apache2 to nginx
September 01, 2012 07:11AM
Hello,

I am migrating all my sites from apache to nginx server. Since I am fairly new with nginx and not very experienced with apache rewrite rules I would need help converting one rewrite rule to my nginx:

Here is my apache rewrite rule:
RewriteRule (.*)\.html index.php?module=website&action=$1

and here is with what I come up in nginx but is not working. I am getting a blank page:
rewrite (.*)\.html /index.php?module=website&action=$1;

thanks in advance for your help.

regards,
zozo6015
Re: migrating from apache2 to nginx
September 30, 2012 05:56AM
location ~ ^(?<path>.*)\.html$ {
include fasctgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param QUERY_STRING "module=website&action=$path"
fastcgi_pass ...;
}

Andrejs
Re: migrating from apache2 to nginx
September 30, 2012 06:02AM
Thanks,

I have some other problem now. I am using smarty templating system which should be generating temporary files. That works perfect on apache but the temporarly files are not generated on nginx however it has write access to the tmp folder.

Thanks
zozo6015
Re: migrating from apache2 to nginx
October 09, 2012 10:44AM
@zozo6015,
Found this tutorial. Thinking it answer your question
http://rtcamp.com/wordpress-nginx/tutorials/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 244
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready