Align all web server usage on apache module.
Change-Id: Idd712a8ee5ec81c6b88b7d3e2270dce4da254927 Reviewed-on: https://review.openstack.org/10838 Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
ce9c4d7c36
commit
361495ea07
|
@ -1,6 +1,5 @@
|
|||
class lodgeit {
|
||||
$packages = [ "nginx",
|
||||
"python-imaging",
|
||||
$packages = [ "python-imaging",
|
||||
"python-jinja2",
|
||||
"python-pybabel",
|
||||
"python-werkzeug",
|
||||
|
@ -9,7 +8,15 @@ class lodgeit {
|
|||
"drizzle",
|
||||
"python-mysqldb" ]
|
||||
|
||||
include apache
|
||||
|
||||
include pip
|
||||
a2mod { 'proxy':
|
||||
ensure => present
|
||||
}
|
||||
a2mod { 'proxy_http':
|
||||
ensure => present
|
||||
}
|
||||
|
||||
package { $packages: ensure => present }
|
||||
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
define lodgeit::site($port, $image="") {
|
||||
define lodgeit::site($vhost_name="paste.$name.org", $port, $image="") {
|
||||
|
||||
file { "/etc/nginx/sites-available/${name}":
|
||||
ensure => 'present',
|
||||
content => template("lodgeit/nginx.erb"),
|
||||
replace => 'true',
|
||||
require => Package[nginx],
|
||||
notify => Service[nginx]
|
||||
}
|
||||
include remove_nginx
|
||||
|
||||
file { "/etc/nginx/sites-enabled/${name}":
|
||||
ensure => link,
|
||||
target => "/etc/nginx/sites-available/${name}",
|
||||
require => Package[nginx]
|
||||
apache::vhost::proxy { $vhost_name:
|
||||
port => 80,
|
||||
dest => "http://localhost:$port",
|
||||
require => File["/srv/lodgeit/${name}"],
|
||||
}
|
||||
|
||||
file { "/etc/init/${name}-paste.conf":
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name paste.<%= name %>.org;
|
||||
root /srv/lodgeit/<%= name %>;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:<%= port %>/;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue