puppet-nginx
                                
                                 puppet-nginx copied to clipboard
                                
                                    puppet-nginx copied to clipboard
                            
                            
                            
                        Allow locations to apply to multiple vhosts
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!
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.
+1
+1
+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.
+1 Seeing this as well.