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 issues #372

Closed
sergakaibis opened this issue Jul 2, 2014 · 3 comments
Closed

$location_custom_cfg issues #372

sergakaibis opened this issue Jul 2, 2014 · 3 comments

Comments

@sergakaibis
Copy link

Hello!
I'm plaing with this module and want to use $location_custom_cfg - I need to set proxy_http_version 1.1; in location block and several others.
My manifest:

 nginx::resource::location { 'root':
    ensure => present,
    vhost => "test.${::domain}",
    location => '/',
    location_custom_cfg => {
      'proxy_pass' => 'http://proxy',
      'proxy_http_version' => '1.1',
      'proxy_read_timeout' => '300s',
      'proxy_set_header' => {
        'Upgrade' => '$http_upgrade',
        'Connection' => '$connection_upgrade',
        'Host' => '$host',
        'X-Real-IP' => '$remote_addr',
        'X-Forwarded-For' => '$proxy_add_x_forwarded_for'
      },
    }
  }

When I apply this, I recive following error:

Error 400 on SERVER: Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined at /etc/puppetlabs/puppet/environments/production/modules/nginx/manifests/resource/location.pp:281 on node

After debugging I see, what before check https://github.com/jfryman/puppet-nginx/blob/master/manifests/resource/location.pp#L280 location_custom_cfg defined and have content, but after is empty. What I'm doing wrong?
PS: when I try to use $proxy instead of $location_custom_cfg result a same
PPS: Sorry for bad English

@3flex
Copy link
Contributor

3flex commented Jul 21, 2014

Which version of Puppet and the nginx module are you using? Can you share more of your manifest (i.e. your nginx::resource::vhost definition)?

There doesn't look to be anything wrong with that definition on its own that would cause that error.

@3flex
Copy link
Contributor

3flex commented Sep 20, 2014

Hi @sergakaibis can you please provide an update? If it's no longer an issue please close it. Thanks!

@sergakaibis
Copy link
Author

Hi, now all ok :)

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