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

Relax or improve the syntax check on proxy_cache_levels #294

Closed
jrrbelmont opened this issue Apr 8, 2014 · 3 comments · Fixed by #382
Closed

Relax or improve the syntax check on proxy_cache_levels #294

jrrbelmont opened this issue Apr 8, 2014 · 3 comments · Fixed by #382

Comments

@jrrbelmont
Copy link

Currently init.pp checks that the value of proxy_cache_levels "isInteger()". nginx allows proxy_cache "levels" values like "1:2" and "1:2:2". This valid syntax is currently not allowed with this mod.

Suggested fix: Remove the "isInteger()" check for proxy_cache_levels in init.pp and replace it with validate_string(). Better fix would be to parse the string and do a better syntax check.

@recastrodiaz
Copy link

+1
Also, listen_port in vhost.pp should allow to set the listen port to something like:

listen_port => '80 default_server',

https://github.com/jfryman/puppet-nginx/blob/master/manifests/resource/vhost.pp#L202

@3flex
Copy link
Contributor

3flex commented May 18, 2014

@recastrodiaz you can already set default_server with the listen_options parameter. See https://github.com/jfryman/puppet-nginx/blob/master/templates/vhost/vhost_header.erb#L2 for how it's rendered in the template.

@recastrodiaz
Copy link

@3flex thanks for the tip!

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

Successfully merging a pull request may close this issue.

3 participants