Running chyrp with nginx rewrites

Gravatar techzilla

  • Posts: 1
  • Topic Created: Sat Dec 10 11:50:38 2011 +0100

Has anyone done the rewrites for installation, using nginx? Should I have any problem using nginx instead of Apache?

Gravatar Arian

Hi techzilla, welcome to Chyrp.

Chyrp is confirmed to to work with Apache, nginx and Lighttpd without a glitch. Here https://github.com/chyrp/chyrp/wiki/Other-Server-Software you have the configuration for both nginx and lighttpd servers.

And for the record, here's a blog post by our member Dmitriy http://dmitriy.us/blog/4/nginx-rewrite-rules-for-chyrp-blog/ which gets Chyrp to work with nginx, a little more detailed.

Gravatar techzilla

Thank you so much, you pointed me in the right direction. It looks like chyrp uses similar rewrites, to other PHP applications I've used. Igor (nginx author) basically advocates using "if" as a last resort, he has whole page on it.

But since you put me in the right direction, i was able to do it like this. ... Which has worked so far.

location / { index index.php; try_files $uri $uri/ /index.php; }

it should do the same thing, and performs better. They say try_files is the best way to do Apache rewrites. I it continues to work without fault, i'll make a comment on the blogs.

Thank you so much for your quick response, it put me right where I needed to be!

Gravatar Arian

Glad you got it sorted out.
If you think there's something you can improve in the Wiki url I posted, you're welcome to do so.
Let us know if you need any help ever. See you around.