Welcome! Log In Create A New Profile

Advanced

I need some help with my cakephp rewrite rules

Posted by yoni5002 
I need some help with my cakephp rewrite rules
June 14, 2012 04:05PM
Hello guys,

I'm completely unexperienced about nginx. In fact, I had no idea of how powerful this little germ was until I tried it myself for the first time two days ago. Anyways, I have been trying to get a cake php application running for more than 24 hours now and I'm getting tired because this is beating me left and right :)

My application is under /newsletter folder in my server and this is what I've come up with to try to get it going:

location /newsletter {
root /home/www/mywebsite/newsletter;
index index.php index.html index.htm;
if (-f $request_filename) {
break;
}
rewrite ^(.+)$ /index.php?url=$1 last;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

When I try to access http://mysite.com/newsletter/ I get a 404 not found :(

Culd you guys help me here, please?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 238
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