jfryman/puppet-nginx — pull request #191 by meckhardt (2013-12-03 20:53:46+00:00)
Title: Remove sorting since it breaks rewrite rules.

Hi,

when using following hiera config:

```yaml
location_custom_cfg:
- rewrite ^/api/(.*) /index_rest.php/$1 last
- rewrite ^/robots.txt /index_cnseo.php last
- rewrite ^/sitemaps/sitemap.*.xml$ /index_cnseo.php last
- rewrite ^/interstitial/.* /interstitial.php last
- rewrite ^([^/]+/)?content/treemenu.*$ /index_treemenu.php$1 last
- rewrite ^(.*)$ /index.php$1 last
```

it produces location code like:

```
location /xy:
rewrite ^(.*)$ /index.php$1 last;
rewrite ^([^/]+/)?content/treemenu.*$ /index_treemenu.php$1 last;
...;
```

Due to sorting the index rule will be set on first position and therefore no other rewrite will ever match.

Regards,
Martin