Skip to content

Commit

Permalink
Updated readme with WSGIPassAuthorization information, updated spec and
Browse files Browse the repository at this point in the history
rspec tests for WSGIPassAuthorization.
  • Loading branch information
Conzar committed May 1, 2014
1 parent 920df08 commit 8481e7d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ Sets up a virtual host with a wildcard alias subdomain mapped to a directory wit
}
```

#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, & `wsgi_script_aliases`
#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, `wsgi_script_aliases`, & `wsgi_pass_authorization`

Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).

Expand All @@ -1043,6 +1043,8 @@ Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).

`wsgi_script_aliases` requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.

`wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html). Defaults to 'undef' where apache will set the defaults setting to 'Off'.

To set up a virtual host with WSGI

```puppet
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ class { 'apache::mod::wsgi': }
wsgi_daemon_process_options => {processes => '2'},
wsgi_process_group => 'nobody',
wsgi_script_aliases => { '/test' => '/test1' },
wsgi_pass_authorization => 'On',
}
EOS
apply_manifest(pp, :catch_failures => true)
Expand All @@ -956,6 +957,7 @@ class { 'apache::mod::wsgi': }
wsgi_import_script_options => { application-group => '%{GLOBAL}', process-group => 'wsgi' },
wsgi_process_group => 'nobody',
wsgi_script_aliases => { '/test' => '/test1' },
wsgi_pass_authorization => 'On',
}
EOS
apply_manifest(pp, :catch_failures => true)
Expand All @@ -968,6 +970,7 @@ class { 'apache::mod::wsgi': }
it { should contain 'WSGIImportScript /test1 application-group=%{GLOBAL} process-group=wsgi' }
it { should contain 'WSGIProcessGroup nobody' }
it { should contain 'WSGIScriptAlias /test "/test1"' }
it { should contain 'WSGIPassAuthorization On' }
end
end

Expand Down
6 changes: 6 additions & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,12 @@
:value => '%{GLOBAL}',
:match => [/^ WSGIApplicationGroup %{GLOBAL}$/],
},
{
:title => 'should accept a wsgi pass authorization',
:attr => 'wsgi_pass_authorization',
:value => 'On',
:match => [/^ WSGIPassAuthorization On$/],
},
{
:title => 'should contain environment variables',
:attr => 'access_log_env_var',
Expand Down

0 comments on commit 8481e7d

Please sign in to comment.