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

Allow locations with try_files only #834

Merged
merged 1 commit into from
Sep 11, 2016
Merged

Conversation

FlorianSW
Copy link
Contributor

This is already possible through location_custom_cfg with a manifest
that looks like:

nginx::resource::location { 'location name':
location => '/',
vhost => 'any vhost',
location_custom_cfg => {
'try_files' => '$uri $uri/ @rewrite',
}
}

This change simplifies the part by allowing to use the try_files
directive on its own (without only in combination with, e.g., www_root):

nginx::resource::location { 'location name':
location => '/',
vhost => 'any vhost',
try_files' => [ '$uri', '$uri/', '@rewrite' ],
}

That looks a bit better as know the user doesn't need to think about,
if he can use try_files or need to use location_custom_cfg in the current
context, anymore.

fixes #470

This is already possible through location_custom_cfg with a manifest
that looks like:

nginx::resource::location { 'location name':
  location  => '/',
  vhost     => 'any vhost',
  location_custom_cfg => {
    'try_files' => '$uri $uri/ @rewrite',
  }
}

This change simplifies the part by allowing to use the try_files
directive on its own (without only in combination with, e.g., www_root):

nginx::resource::location { 'location name':
  location  => '/',
  vhost     => 'any vhost',
  try_files' => [ '$uri', '$uri/', '@rewrite' ],
}

That looks a bit better as know the user doesn't need to think about,
if he can use try_files or need to use location_custom_cfg in the current
context, anymore.

fixes voxpupuli#470
@c33s c33s mentioned this pull request Sep 6, 2016
@jyaworski jyaworski merged commit 67ec0ea into voxpupuli:master Sep 11, 2016
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Sep 13, 2019
Allow locations with try_files only
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
Allow locations with try_files only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot create location with only try_files defined
3 participants