Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vhost_cfg_append with multiple entries having the same name (rewrite) not possible #807

Closed
hostingnuggets opened this issue May 18, 2016 · 3 comments
Assignees

Comments

@hostingnuggets
Copy link

in my hiera node yaml file I would like to add more than one rewrite rule using vhost_cfg_append as such:

    vhost_cfg_append:
      rewrite: '^/caldav(.*)$ /remote.php/caldav$1 redirect'
      rewrite: '^/carddav(.*)$ /remote.php/carddav$1 redirect'
      rewrite: '^/webdav(.*)$ /remote.php/webdav$1 redirect'

but at the end the nginx server config file generated only includes one single rewrite rule (the last one). i think this should be changed so that all *_cfg_append can have config entries with the same name.

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

For most of the things I've tested, you can just use a hash or array instead.
Have you tried:

    vhost_cfg_append:
      rewrite:
        - '^/caldav(.*)$ /remote.php/caldav$1 redirect'
        - '^/carddav(.*)$ /remote.php/carddav$1 redirect'
        - '^/webdav(.*)$ /remote.php/webdav$1 redirect'

@wyardley wyardley self-assigned this Oct 8, 2016
@wyardley
Copy link
Collaborator

@hostingnuggets: btw, the module has supported the 'rewrite' directive via $rewrite_rules parameter in both vhosts and locations since 2014. Can you try if just using the $rewrite_rules param instead of $vhost_cfg_append works? This is an array, so you should definitely be able to support multiple rules.

@wyardley
Copy link
Collaborator

I'm closing this for now, please comment or reopen if you have any additional information to add.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants