Need help with nginx rewrites (for sub-domains)
Igor Sysoev
igor at sysoev.ru
Fri Apr 29 14:33:11 MSD 2011
On Fri, Apr 29, 2011 at 01:11:17AM +0200, Jimish Jobanputra wrote:
> Hello,
>
> I have been scratching my head last 2 days trying to get this working:
>
> I have a Rails application, say, http://example.com and now I want to
> run a PHP app on http://example.com/coupons
>
> I set up the PHP app but I am having a hard time with nginx rewrites. I
> hope someone here can assist me:
>
> Here's how I set up things in nginx.conf
>
> https://gist.github.com/946479
>
> Now http://example.com/coupons loads up the home page, however if I try
> http://example.com/coupons/ (with the extra slash), it says "No input
> file found"
>
> Same goes with http://example.com/coupons/Admin and so on.. somehow the
> rewrites are screwed up i guess..
>
> PS: The above code has been tweaked again and again, so if there is
> something silly, be nice and let me know ;)
It's really hard to understand using your configuration how
/coupons URLs should be processed. Could describe it like this
/coupons
script /home/jjobanputra/code/coupon/upload/index.php
/coupons/
script /home/jjobanputra/code/coupon/upload/index.php
/coupons/Admin
scipt /home/jjobanputra/code/coupon/upload/index.php
path_info /Admin
/coupons/image.gif
file /home/jjobanputra/code/coupon/upload/image.gif
--
Igor Sysoev
More information about the nginx
mailing list