puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Allow locations to apply to multiple vhosts

Open weeve opened this issue 11 years ago • 5 comments

I have a case where I've defined a location resource, but I need it to apply to multiple vhosts. If there isn't a way to do this that I'm missing, I'd like to suggest it as a feature request. Thanks!

weeve avatar Oct 03 '14 13:10 weeve

I second this. This feature would greatly reduce the lines of codes in some of my hiera configs.

I could create a pull request for this change but I would like to know beforehand if this is a wanted feature because I am not willing to maintain a fork of this module with my own changes.

mmerfort avatar Oct 24 '14 11:10 mmerfort

+1

dene14 avatar May 29 '15 23:05 dene14

+1

cryptk avatar Sep 17 '15 01:09 cryptk

+1

In my example, I need to specify a default location '/' that is uses a proxy_pass statement that is available to multiple vhosts.

nginx::nginx_vhosts: site-a server_name: - "www.sitea.com www_root: /var/www/site-a use_default_location: false site-b server_name: - "www.siteb.com www_root: /var/www/site-a use_default_location: false nginx::nginx_locations: '/': vhost: 'site-a proxy: http://$service_edge_backend ssl: true '/': vhost: 'site-b proxy: http://$service_edge_backend ssl: true

What I'm seeing today is that 'site-a' gets a location directive, but site-b only gets the vhost stanza with no location.

dagen avatar May 23 '16 19:05 dagen

+1 Seeing this as well.

m2bright avatar Sep 02 '16 23:09 m2bright