Serving an iPhone website with nginx

Nick Pearson nick.pearson at
Tue Jan 13 01:19:11 MSK 2009

nginx crowd,

(For those not interested in serving an iPhone site, feel free to delete

While recently working on an iPhone website, I found I had some seemingly
common requirements but couldn't find any good write-ups on how to serve
such a site with nginx.  While it's of course just a "normal" website, I
wanted to redirect iPhone users to an optimized version of the site while
still allowing them to get back to the full site if necessary.  I also
needed to serve two versions of the same page from a mobile-optimized
website for the same URL (an iPhone version and a standard mobile version,
based on user agent) while allowing each version of the page to be cached

If anyone else has similar needs and would like to learn from my
experiences, this has the potential to save you a good day or two of
searching/reading/experimenting/puzzling/etc.  My write-up is at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list