Merge "Fix vhost configuration sections"

This commit is contained in:
Jenkins 2015-01-24 21:26:37 +00:00 committed by Gerrit Code Review
commit 660279d8fb
7 changed files with 46 additions and 41 deletions
modules
etherpad_lite/templates
gerrit/templates
logstash/templates
nodepool/templates
openstackid/templates
zuul/templates

@ -1,4 +1,5 @@
<VirtualHost <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>
ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %> ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %>
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-error.log ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-error.log
@ -12,7 +13,7 @@
</VirtualHost> </VirtualHost>
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>:443> <VirtualHost *:443>
ServerName <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %> ServerName <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>
ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %> ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %>

@ -1,4 +1,5 @@
<VirtualHost <%= scope.lookupvar("gerrit::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("gerrit::vhost_name") %>
ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %> ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %>
ErrorLog ${APACHE_LOG_DIR}/gerrit-error.log ErrorLog ${APACHE_LOG_DIR}/gerrit-error.log
@ -12,7 +13,7 @@
</VirtualHost> </VirtualHost>
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost <%= scope.lookupvar("gerrit::vhost_name") %>:443> <VirtualHost *:443>
ServerName <%= scope.lookupvar("gerrit::vhost_name") %> ServerName <%= scope.lookupvar("gerrit::vhost_name") %>
ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %> ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %>
AllowEncodedSlashes NoDecode AllowEncodedSlashes NoDecode

@ -1,31 +1,31 @@
<VirtualHost <%= scope.lookupvar("::logstash::web::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("::logstash::web::vhost_name") %> ServerName <%= scope.lookupvar("::logstash::web::vhost_name") %>
ServerAdmin <%= scope.lookupvar("::logstash::web::serveradmin") %> ServerAdmin <%= scope.lookupvar("::logstash::web::serveradmin") %>
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-error.log ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-error.log
LogLevel warn LogLevel warn
CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-access.log combined CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-access.log combined
<IfModule mod_proxy.c> <IfModule mod_proxy.c>
<% if @proxy_elasticsearch == true %> <% if @proxy_elasticsearch == true %>
# Proxy GETs for elasticsearch .*/_aliases, .*/_status, .*/_search, # Proxy GETs for elasticsearch .*/_aliases, .*/_status, .*/_search,
# .*/_mapping, .*/_mapping/field/.*, _cluster/health, and _nodes. # .*/_mapping, .*/_mapping/field/.*, _cluster/health, and _nodes.
RewriteEngine on RewriteEngine on
RewriteCond %{REQUEST_METHOD} GET RewriteCond %{REQUEST_METHOD} GET
RewriteRule ^/elasticsearch/((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping|(.*/)?_mapping/field/(.*)?|_cluster/health|_nodes)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] RewriteRule ^/elasticsearch/((.*/)?_aliases|(.*/)?_status|(.*/)?_search|(.*/)?_mapping|(.*/)?_mapping/field/(.*)?|_cluster/health|_nodes)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P]
RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^/elasticsearch/(_aliases|(.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] RewriteRule ^/elasticsearch/(_aliases|(.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P]
RewriteCond %{REQUEST_METHOD} OPTIONS RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^/elasticsearch/((.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P] RewriteRule ^/elasticsearch/((.*/)?_search)$ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 [P]
<Proxy http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/> <Proxy http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/>
ProxySet connectiontimeout=15 timeout=120 ProxySet connectiontimeout=15 timeout=120
</Proxy> </Proxy>
ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/ ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/
<% end %> <% end %>
ProxyPass / http://127.0.0.1:5601/ retry=0 ProxyPass / http://127.0.0.1:5601/ retry=0
ProxyPassReverse / http://127.0.0.1:5601/ ProxyPassReverse / http://127.0.0.1:5601/
</IfModule> </IfModule>
</VirtualHost> </VirtualHost>

@ -1,13 +1,13 @@
<VirtualHost <%= @vhost_name %>:80> <VirtualHost *:80>
ServerName <%= @vhost_name %> ServerName <%= @vhost_name %>
ServerAdmin <%= @serveradmin %> ServerAdmin <%= @serveradmin %>
ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log
LogLevel warn LogLevel warn
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
ProxyPass / http://127.0.0.1:9292/ retry=0 ProxyPass / http://127.0.0.1:9292/ retry=0
ProxyPassReverse / http://127.0.0.1:9292/ ProxyPassReverse / http://127.0.0.1:9292/
</VirtualHost> </VirtualHost>

@ -1,4 +1,5 @@
<VirtualHost <%= scope.lookupvar("nodepool::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("nodepool::vhost_name") %>
DocumentRoot <%= scope.lookupvar("nodepool::image_log_document_root") %> DocumentRoot <%= scope.lookupvar("nodepool::image_log_document_root") %>
<Directory <%= scope.lookupvar("nodepool::image_log_document_root") %>> <Directory <%= scope.lookupvar("nodepool::image_log_document_root") %>>

@ -1,4 +1,5 @@
<VirtualHost <%= scope.lookupvar("openstackid::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("openstackid::vhost_name") %>
ServerAdmin <%= scope.lookupvar("openstackid::serveradmin") %> ServerAdmin <%= scope.lookupvar("openstackid::serveradmin") %>
ErrorLog ${APACHE_LOG_DIR}/openstackid-error.log ErrorLog ${APACHE_LOG_DIR}/openstackid-error.log
@ -10,7 +11,7 @@
</VirtualHost> </VirtualHost>
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost <%= scope.lookupvar("openstackid::vhost_name") %>:443> <VirtualHost *:443>
ServerName <%= scope.lookupvar("openstackid::vhost_name") %> ServerName <%= scope.lookupvar("openstackid::vhost_name") %>
ServerAdmin <%= scope.lookupvar("openstackid::serveradmin") %> ServerAdmin <%= scope.lookupvar("openstackid::serveradmin") %>

@ -1,4 +1,5 @@
<VirtualHost <%= scope.lookupvar("::zuul::vhost_name") %>:80> <VirtualHost *:80>
ServerName <%= scope.lookupvar("::zuul::vhost_name") %>
ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %> ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %>
DocumentRoot /var/lib/zuul/www DocumentRoot /var/lib/zuul/www