-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some tests for ProxyPass parameters
- Loading branch information
1 parent
934f2d4
commit 4c54a52
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## vhost with proxyPass directive | ||
# NB: Please see the other vhost_*.pp example files for further | ||
# examples. | ||
|
||
# Base class. Declares default vhost on port 80 and default ssl | ||
# vhost on port 443 listening on all interfaces and serving | ||
# $apache::docroot | ||
class { 'apache': } | ||
|
||
# Most basic vhost with proxy_pass | ||
apache::vhost { 'first.example.com': | ||
port => 80, | ||
docroot => '/var/www/first', | ||
proxy_pass => [ | ||
{ | ||
'path' => '/first', | ||
'url' => "http://localhost:8080/first" | ||
}, | ||
], | ||
} | ||
|
||
# vhost with proxy_pass and parameters | ||
apache::vhost { 'second.example.com': | ||
port => 80, | ||
docroot => '/var/www/second', | ||
proxy_pass => [ | ||
{ | ||
'path' => '/second', | ||
'url' => "http://localhost:8080/second", | ||
'params' => {'retry' => '0', 'timeout' => '5'} | ||
}, | ||
], | ||
} | ||
|
||
# vhost with proxy_pass and keywords | ||
apache::vhost { 'third.example.com': | ||
port => 80, | ||
docroot => '/var/www/third', | ||
proxy_pass => [ | ||
{ | ||
'path' => '/third', | ||
'url' => "http://localhost:8080/third", | ||
'keywords' => ['noquery', 'interpolate'] | ||
}, | ||
], | ||
} | ||
|
||
# vhost with proxy_pass, parameters and keywords | ||
apache::vhost { 'fourth.example.com': | ||
port => 80, | ||
docroot => '/var/www/fourth', | ||
proxy_pass => [ | ||
{ | ||
'path' => '/fourth', | ||
'url' => "http://localhost:8080/fourth", | ||
'params' => {'retry' => '0', 'timeout' => '5'}, | ||
'keywords' => ['noquery', 'interpolate'] | ||
}, | ||
], | ||
} |