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

Adding FastCGI index #1073

Merged
merged 1 commit into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# [*fastcgi*] - location of fastcgi (host:port)
# [*fastcgi_param*] - Set additional custom fastcgi_params
# [*fastcgi_params*] - optional alternative fastcgi_params file to use
# [*fastcgi_index*] - optional FastCGI index page
# [*fastcgi_script*] - optional SCRIPT_FILE parameter
# [*uwsgi_read_timeout*] - optional value for uwsgi_read_timeout
# [*ssl*] - Indicates whether to setup SSL bindings for this server.
Expand Down Expand Up @@ -191,6 +192,7 @@
Optional[String] $proxy_buffering = undef,
Array $resolver = [],
Optional[String] $fastcgi = undef,
Optional[String] $fastcgi_index = undef,
$fastcgi_param = undef,
String $fastcgi_params = "${::nginx::conf_dir}/fastcgi_params",
Optional[String] $fastcgi_script = undef,
Expand Down Expand Up @@ -342,6 +344,7 @@
proxy_set_body => $proxy_set_body,
proxy_buffering => $proxy_buffering,
fastcgi => $fastcgi,
fastcgi_index => $fastcgi_index,
fastcgi_param => $fastcgi_param,
fastcgi_params => $fastcgi_params,
fastcgi_script => $fastcgi_script,
Expand Down
11 changes: 10 additions & 1 deletion spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{
www_root: '/',
ipv6_enable: true,
listen_unix_socket_enable: true
listen_unix_socket_enable: true,
fastcgi_index: 'index.php'
}
end

Expand Down Expand Up @@ -986,6 +987,14 @@
it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0644') }
end

context 'when fastcgi_index => "index.php"' do
let :params do
default_params.merge(fastcgi_index: 'index.php')
end

it { is_expected.to contain_nginx__resource__location("#{title}-default").with_fastcgi_index('index.php') }
end

context 'when fastcgi_param => {key => value}' do
let :params do
default_params.merge(fastcgi_param: { 'key' => 'value' })
Expand Down