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

location_custom_cfg not processing in template #567

Closed
VolJin opened this issue Feb 10, 2015 · 4 comments
Closed

location_custom_cfg not processing in template #567

VolJin opened this issue Feb 10, 2015 · 4 comments

Comments

@VolJin
Copy link

VolJin commented Feb 10, 2015

location_custom_cfg not processing in template

@Zophar78
Copy link
Contributor

Do you have an example of how you are using it?

@VolJin
Copy link
Author

VolJin commented Feb 16, 2015

I use module nginx from hiera:
nginx::nginx_vhosts:
"00-default_nonssl":
www_root: '/var/www/default'
listen_options: 'default'
server_name:
- "%{::fqdn}"
- "default"
proxy: 'http://nginx-upstr$uri?$args'
proxy_set_header:
- "Host $host"
- 'X-Real-IP $remote_addr'
- 'X-Forwarded-For $remote_addr'
location_custom_cfg:
proxy_ignore_client_abort: 'on'
I think option "proxy_ignore_client_abort" is must be add to default location '/', but isn't add.
in module nginx::resource::vhost this option exist, it exist in ::nginx::resource::location {"${name_sanitized}-default"
But not exist in template in location 'nginx/vhost/locations/proxy.erb'

@3flex
Copy link
Contributor

3flex commented Apr 13, 2015

I'm assuming that should have been formatted like this:

nginx::nginx_vhosts:
  "00-default_nonssl":
    www_root: '/var/www/default'
    listen_options: 'default'
    server_name:
      - "%{::fqdn}"
      - "default"
    proxy: 'http://nginx-upstr$uri?$args'
    proxy_set_header:
      - "Host $host"
      - 'X-Real-IP $remote_addr'
      - 'X-Forwarded-For $remote_addr'
    location_custom_cfg:
      proxy_ignore_client_abort: 'on'

You're right that location_custom_cfg doesn't exist in vhost/locations/proxy.erb. Instead, use location_cfg_prepend or location_cfg_append. That will add it to the beginning or end of the location block.

@3flex
Copy link
Contributor

3flex commented May 19, 2015

Closing for now. @VolJin if you still have issues please comment with more details and I'll reopen.

@3flex 3flex closed this as completed May 19, 2015
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

3 participants