replaced humhub backend
This commit is contained in:
parent
93a70a9a79
commit
0c5a363111
4 changed files with 7712 additions and 2 deletions
26
global/overlay/etc/puppet/modules/net/manifests/forum.pp
Normal file
26
global/overlay/etc/puppet/modules/net/manifests/forum.pp
Normal file
|
@ -0,0 +1,26 @@
|
|||
class net::forum {
|
||||
# Required packages
|
||||
package { ['php', 'mysql-server', 'mysql-client']:
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
# Create virtual host configuration file
|
||||
file { '/etc/apache2/sites-enabled/humhub.conf':
|
||||
ensure => file,
|
||||
content => template('net/forum/humhub.conf.erb'),
|
||||
mode => '0644',
|
||||
require => Package['apache2'],
|
||||
notify => Service['apache2'],
|
||||
}
|
||||
|
||||
# Create a basic index.html
|
||||
file { '/var/www/index.html':
|
||||
ensure => file,
|
||||
content => template('net/forum/index.html.erb'),
|
||||
owner => 'www-data',
|
||||
group => 'www-data',
|
||||
mode => '0644',
|
||||
require => Package['apache2'],
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName <%= @networking['fqdn'] %>
|
||||
ServerAdmin kristofer@sunet.se
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/private/forum-sto3-prod-1.sunet.se_infra.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/forum-sto3-prod-1.sunet.se_infra.key
|
||||
SSLCertificateChainFile /etc/ssl/certs/forum-sto3-prod-1.sunet.se_infra.crt
|
||||
|
||||
#DocumentRoot /var/www/
|
||||
DocumentRoot /var/www/humhub
|
||||
|
||||
Define VPATH /ooffice
|
||||
Define DS_ADDRESS localhost:8080
|
||||
|
||||
<Location ${VPATH}>
|
||||
Require all granted
|
||||
SetEnvIf Host "^(.*)$" THE_HOST=$1
|
||||
RequestHeader setifempty X-Forwarded-Proto http
|
||||
RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
|
||||
RequestHeader edit X-Forwarded-Host (.*) $1${VPATH}
|
||||
ProxyAddHeaders Off
|
||||
</Location>
|
||||
|
||||
ProxyPassMatch ^\${VPATH}(.*)(\/websocket)$ "ws://${DS_ADDRESS}/$1$2"
|
||||
ProxyPass ${VPATH} "http://${DS_ADDRESS}"
|
||||
ProxyPassReverse ${VPATH} "http://${DS_ADDRESS}"
|
||||
|
||||
<Directory /var/www/humhub/>
|
||||
Options -Indexes -FollowSymLinks
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
|
||||
<DirectoryMatch "/var/www/humhub/(\.|protected|themes/\w+/views|uploads/file)">
|
||||
Order Deny,Allow
|
||||
Deny from all
|
||||
</DirectoryMatch>
|
||||
|
||||
<FilesMatch "^\.">
|
||||
Order Deny,Allow
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
<DirectoryMatch "/var/www/humhub/(static|uploads|themes|assets)">
|
||||
Header set Cache-Control "max-age=172800, public"
|
||||
</DirectoryMatch>
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName forum.sunet.se
|
||||
Redirect / https://forum.sunet.se
|
||||
</VirtualHost>
|
7632
global/overlay/etc/puppet/modules/net/templates/forum/index.html.erb
Normal file
7632
global/overlay/etc/puppet/modules/net/templates/forum/index.html.erb
Normal file
File diff suppressed because one or more lines are too long
|
@ -175,8 +175,8 @@ sunet_frontend:
|
|||
ips: ['37.156.192.14', '2001:6b0:60:c0::14']
|
||||
backends:
|
||||
default:
|
||||
'humhub-idp-proxy-1.sunet.se':
|
||||
ips: ['89.45.236.42']
|
||||
'humhubproxy-sto1-prod-2.sunet.se':
|
||||
ips: ['89.47.185.154']
|
||||
server_args: 'ssl check verify none'
|
||||
'humhub-idp-proxy-2.sunet.se':
|
||||
ips: ['89.47.185.213']
|
||||
|
|
Loading…
Add table
Reference in a new issue