BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365286 )

Change subject: librenms: bugfix for HTTPS redirect
......................................................................


librenms: bugfix for HTTPS redirect

The HTTP->HTTPS redirect was using an empty hostname in the
Location header.  Turns out this is due to a type of @sitename as
@site_name.  Also fixed up the other obvious place the templated
value could/should be used here.

Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198
---
M modules/librenms/templates/apache.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/librenms/templates/apache.conf.erb 
b/modules/librenms/templates/apache.conf.erb
index 4b5dcf2..2fdc25b 100644
--- a/modules/librenms/templates/apache.conf.erb
+++ b/modules/librenms/templates/apache.conf.erb
@@ -1,10 +1,10 @@
 <VirtualHost *:80>
-    ServerName librenms.wikimedia.org
+    ServerName <%= @sitename %>
     ServerAdmin n...@wikimedia.org
     Include /etc/acme/challenge-apache.conf
     RewriteEngine on
     RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
-    RewriteRule ^/(.*)$ https://<%= @site_name %>/$1 [L,R=301]
+    RewriteRule ^/(.*)$ https://<%= @sitename %>/$1 [L,R=301]
 </VirtualHost>
 
 <VirtualHost *:443>

-- 
To view, visit https://gerrit.wikimedia.org/r/365286
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to