c1ffb9f145
* manifests/site.pp: Pass new mysql DB variables to openstack::etherpad*. * modules/etherpad_lite/manifests/apache.pp: Fix broken /etc/ssl/certs permissions (0700 -> 0755). * modules/etherpad_lite/manifests/init.pp: Update default nodejs and etherpad versions. Remove ep_headings plugin install. New plugin define should be used for this instead. Stop making the etherpad-lite ref to checkout optional (defaults to develop). Note these changes are probably not going to be backward compat. * modules/etherpad_lite/manifests/plugin.pp: Define to install etherpad lite plugins. * modules/etherpad_lite/manifests/site.pp: Simplify DB support and remove support for the dirty DB type. * modules/etherpad_lite/templates/etherpad-lite_settings.json.erb: Bring settings erb up to par with latest template. * modules/etherpad_lite/templates/etherpadlite.vhost.erb: Update rewrite rules for new etherpad. Instead of allowing nice pad urls rooted at / redirect these url to /p/padname. Etherpad does not deal well with a change in root path as /p/ is hardcoded in many places. * modules/openstack_project/manifests/etherpad.pp * modules/openstack_project/manifests/etherpad_dev.pp: Update to use new etherpad module setup. MySQL DBs are now externally managed, pass in needed connection info. * modules/mysql_backup/manifests/backup_remote.pp: New define to backup remote DB servers. * modules/mysql_backup/templates/my.cnf.erb: Template for a my.cnf to be used by the cron in backup_remote.pp. Allows for easy connectivity from server using MySQL DB as root. Change-Id: I1250297674b91e81d59cd28c07c52e09967ca548
73 lines
3.1 KiB
Plaintext
73 lines
3.1 KiB
Plaintext
<VirtualHost <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>:80>
|
|
ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-error.log
|
|
|
|
LogLevel warn
|
|
|
|
CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-access.log combined
|
|
|
|
Redirect / https://<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>/
|
|
|
|
</VirtualHost>
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>:443>
|
|
ServerName <%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>
|
|
ServerAdmin <%= scope.lookupvar("etherpad_lite::apache::serveradmin") %>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-ssl-error.log
|
|
|
|
LogLevel warn
|
|
|
|
CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>-ssl-access.log combined
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile <%= scope.lookupvar("etherpad_lite::apache::ssl_cert_file") %>
|
|
SSLCertificateKeyFile <%= scope.lookupvar("etherpad_lite::apache::ssl_key_file") %>
|
|
<% if scope.lookupvar("etherpad_lite::apache::ssl_chain_file") != "" %>
|
|
SSLCertificateChainFile <%= scope.lookupvar("etherpad_lite::apache::ssl_chain_file") %>
|
|
<% end %>
|
|
|
|
BrowserMatch "MSIE [2-6]" \
|
|
nokeepalive ssl-unclean-shutdown \
|
|
downgrade-1.0 force-response-1.0
|
|
# MSIE 7 and newer should be able to use keepalive
|
|
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
|
|
|
<IfModule mod_proxy.c>
|
|
# The following redirects "nice" urls such as https://etherpad.example.org/padname
|
|
# to https://etherpad.example.org/p/padname. It was problematic directly
|
|
# supporting "nice" urls as etherpad hardcodes /p/ in many places.
|
|
# Adapted from https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy
|
|
RewriteEngine on
|
|
RewriteCond %{HTTP_HOST} !<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>
|
|
RewriteRule ^.*$ https://<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %> [L,R=301]
|
|
|
|
RewriteCond %{REQUEST_URI} !^/p/
|
|
RewriteCond %{REQUEST_URI} !^/locales/
|
|
RewriteCond %{REQUEST_URI} !^/locales.json
|
|
RewriteCond %{REQUEST_URI} !^/admin
|
|
RewriteCond %{REQUEST_URI} !^/p/
|
|
RewriteCond %{REQUEST_URI} !^/static/
|
|
RewriteCond %{REQUEST_URI} !^/pluginfw/
|
|
RewriteCond %{REQUEST_URI} !^/javascripts/
|
|
RewriteCond %{REQUEST_URI} !^/socket.io/
|
|
RewriteCond %{REQUEST_URI} !^/ep/
|
|
RewriteCond %{REQUEST_URI} !^/minified/
|
|
RewriteCond %{REQUEST_URI} !^/api/
|
|
RewriteCond %{REQUEST_URI} !^/ro/
|
|
RewriteCond %{REQUEST_URI} !^/error/
|
|
RewriteCond %{REQUEST_URI} !^/jserror
|
|
RewriteCond %{REQUEST_URI} !/favicon.ico
|
|
RewriteCond %{REQUEST_URI} !/robots.txt
|
|
RewriteRule ^/+(.+)$ https://<%= scope.lookupvar("etherpad_lite::apache::vhost_name") %>/p/$1 [NC,L,R=301]
|
|
|
|
RewriteRule ^/(.*)$ http://localhost:9001/$1 [P]
|
|
ProxyPassReverse / http://localhost:9001/
|
|
</IfModule>
|
|
|
|
</VirtualHost>
|
|
</IfModule>
|