[freeze break request] Mark localhost as a ServerAlias of fp.o on proxies

Ricky Elrod codeblock at elrod.me
Mon May 25 02:24:55 UTC 2015


Right now collectd is not logging apache stats for any of our proxies...

The reason why is this:
[root at proxy01 conf.d]# curl "http://localhost/apache-status?auto"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a
href="https://localhost/apache-status?auto">here</a>.</p>
<hr>
<address>Apache/2.4.6 (Red Hat Enterprise Linux) Server at localhost
Port 80</address>
</body></html>


I'd like to apply the following patch to allow localhost to be a
ServerAlias for a VirtualHost that doesn't force redirects to https
rather than defaulting to the first VirtualHost alphabetically.

This has been tested on proxy01.stg and nothing catastrophic seems to
have happened.

Patch follows.

diff --git a/playbooks/include/proxies-websites.yml
b/playbooks/include/proxies-websites.yml
index c398a23..febfc83 100644
--- a/playbooks/include/proxies-websites.yml
+++ b/playbooks/include/proxies-websites.yml
@@ -49,7 +49,9 @@
   - role: httpd/website
     name: fedoraproject.org
     cert_name: "{{wildcard_cert_name}}"
-    server_aliases: [stg.fedoraproject.org]
+    server_aliases:
+    - stg.fedoraproject.org
+    - localhost

   # This is for all the other domains we own
   # that redirect to http://fedoraproject.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20150524/7aafbd25/attachment.sig>


More information about the infrastructure mailing list