From 87897355b014ce73ec39121e973d205c820c181b Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 28 Mar 2024 13:56:38 -0500 Subject: [PATCH] Punt task "Disable Apache2 server name." (for Debian 12). Debian 12 does not configure Apache with a ServerName (as Debian 11 did?). --- README.html | 131 +++++++++++++++++------------------- README.org | 11 --- roles_t/core/tasks/main.yml | 9 --- 3 files changed, 60 insertions(+), 91 deletions(-) diff --git a/README.html b/README.html index 2186573..4408e4c 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + A Small Institute @@ -48,7 +48,7 @@ connects to Front making the institute email, cloud, etc. available to members off campus.

-
+
                 =                                                   
               _|||_                                                 
         =-The-Institute-=                                           
@@ -1022,7 +1022,7 @@ example result follows the code.
 
-
+

=> 10.62.17.0/24

@@ -1475,7 +1475,7 @@ USB-Ethernet adapter, or a wireless adapter connected to a campground Wi-Fi access point, etc. -
+
 =============== | ==================================================
                 |                                           Premises
           (Campus ISP)                                              
@@ -1498,7 +1498,7 @@ This avoids the need for a second Wi-Fi access point and leads to the
 following topology.
 

-
+
 =============== | ==================================================
                 |                                           Premises
            (House ISP)                                              
@@ -1651,8 +1651,8 @@ The all role contains tasks that are executed on all of the
 institute's servers.  At the moment there is just the one.
 

-
-

6.1. Include Particulars

+
+

6.1. Include Particulars

The all role's task contains a reference to a common institute @@ -1793,8 +1793,8 @@ uses the institute's CA and server certificates, and expects client certificates signed by the institute CA.

-
-

7.1. Include Particulars

+
+

7.1. Include Particulars

The first task, as in The All Role, is to include the institute @@ -1819,8 +1819,8 @@ membership roll, so these are included was well.

-
-

7.2. Configure Hostname

+
+

7.2. Configure Hostname

This task ensures that Front's /etc/hostname and /etc/mailname are @@ -1850,8 +1850,8 @@ delivery.

-
-

7.3. Add Administrator to System Groups

+
+

7.3. Add Administrator to System Groups

The administrator often needs to read (directories of) log files owned @@ -1910,8 +1910,8 @@ those stored in Secret/ssh_front/etc/ssh/

-
-

7.5. Configure Monkey

+
+

7.5. Configure Monkey

The small institute runs cron jobs and web scripts that generate @@ -1967,8 +1967,8 @@ Monkey uses Rsync to keep the institute's public web site up-to-date.

-
-

7.7. Install Unattended Upgrades

+
+

7.7. Install Unattended Upgrades

The institute prefers to install security updates as soon as possible. @@ -1983,8 +1983,8 @@ The institute prefers to install security updates as soon as possible.

-
-
-

7.9. Install Server Certificate

+
+

7.9. Install Server Certificate

The servers on Front use the same certificate (and key) to @@ -2255,8 +2255,8 @@ created by a more specialized role.

-
-

7.12. Configure Dovecot IMAPd

+
+

7.12. Configure Dovecot IMAPd

Front uses Dovecot's IMAPd to allow user Fetchmail jobs on Core to @@ -2612,8 +2612,8 @@ the users' ~/Public/HTML/ directories.

-
-

7.14. Configure OpenVPN

+
+

7.14. Configure OpenVPN

Front uses OpenVPN to provide the institute's public VPN service. The @@ -2896,8 +2896,8 @@ Debian install and remote access to a privileged, administrator's account. (For details, see The Core Machine.)

-
-

8.1. Include Particulars

+
+

8.1. Include Particulars

The first task, as in The Front Role, is to include the institute @@ -2919,8 +2919,8 @@ particulars and membership roll.

-
-

8.2. Configure Hostname

+
+

8.2. Configure Hostname

This task ensures that Core's /etc/hostname and /etc/mailname are @@ -2953,8 +2953,8 @@ proper email delivery.

-
-

8.3. Configure Systemd Resolved

+
+

8.3. Configure Systemd Resolved

Core runs the campus name server, so Resolved is configured to use it @@ -3377,8 +3377,8 @@ craps up /var/log/ and the Systemd journal.

-
-

8.7. Add Administrator to System Groups

+
+

8.7. Add Administrator to System Groups

The administrator often needs to read (directories of) log files owned @@ -3398,8 +3398,8 @@ these groups speeds up debugging.

-
-

8.8. Configure Monkey

+
+

8.8. Configure Monkey

The small institute runs cron jobs and web scripts that generate @@ -3466,8 +3466,8 @@ described in *Configure Apache2).

-
-

8.9. Install Unattended Upgrades

+
+

8.9. Install Unattended Upgrades

The institute prefers to install security updates as soon as possible. @@ -3499,8 +3499,8 @@ with Nextcloud on the command line.

-
-

8.11. Configure User Accounts

+
+

8.11. Configure User Accounts

User accounts are created immediately so that backups can begin @@ -3542,8 +3542,8 @@ describes the members and usernames variables.

-
-

8.12. Install Server Certificate

+
+

8.12. Install Server Certificate

The servers on Core use the same certificate (and key) to authenticate @@ -3767,8 +3767,8 @@ installed by more specialized roles.

-
-

8.16. Configure Dovecot IMAPd

+
+

8.16. Configure Dovecot IMAPd

Core uses Dovecot's IMAPd to store and serve member emails. As on @@ -4158,8 +4158,6 @@ trained staffers, monitored by a revision control system, etc.

The tasks below install Apache2 and edit its default configuration. -The global ServerName directive must be deleted because it seems to -interfere with mapping URLs to the correct virtual host.

@@ -4168,15 +4166,6 @@ interfere with mapping URLs to the correct virtual host. become: yes apt: pkg=apache2 -- name: Disable Apache2 server name. - become: yes - lineinfile: - path: /etc/apache2/apache2.conf - regexp: "([^#]+)ServerName (.*)" - backrefs: yes - line: "# \\1ServerName \\2" - notify: Restart Apache2. - - name: Enable Apache2 modules. become: yes apache2_module: @@ -5551,8 +5540,8 @@ applied first, by which Gate gets a campus machine's DNS and Postfix configurations, etc.

-
-

9.1. Include Particulars

+
+

9.1. Include Particulars

The following should be familiar boilerplate by now. @@ -5921,8 +5910,8 @@ the daemon listens only on the Gate-WiFi network interface.

-
-

9.6. Install Server Certificate

+
+

9.6. Install Server Certificate

The (OpenVPN) server on Gate uses an institute certificate (and key) @@ -5949,8 +5938,8 @@ and Front) do.

-
-

9.7. Configure OpenVPN

+
+

9.7. Configure OpenVPN

Gate uses OpenVPN to provide the institute's campus VPN service. Its @@ -6077,8 +6066,8 @@ Wireless campus devices can get a key to the campus VPN from the configured manually.

-
-

10.1. Include Particulars

+
+

10.1. Include Particulars

The following should be familiar boilerplate by now. @@ -6094,8 +6083,8 @@ The following should be familiar boilerplate by now.

-
-

10.2. Configure Hostname

+
+

10.2. Configure Hostname

Clients should be using the expected host name. @@ -6122,8 +6111,8 @@ Clients should be using the expected host name.

-
-

10.3. Configure Systemd Resolved

+
+

10.3. Configure Systemd Resolved

Campus machines use the campus name server on Core (or dns.google), @@ -6194,8 +6183,8 @@ and file timestamps.

-
-

10.5. Add Administrator to System Groups

+
+

10.5. Add Administrator to System Groups

The administrator often needs to read (directories of) log files owned @@ -6215,8 +6204,8 @@ these groups speeds up debugging.

-
-

10.6. Install Unattended Upgrades

+
+

10.6. Install Unattended Upgrades

The institute prefers to install security updates as soon as possible. @@ -9156,7 +9145,7 @@ routes on Front and Gate, making the simulation less… similar.

Author: Matt Birkholz

-

Created: 2024-03-11 Mon 17:33

+

Created: 2024-03-28 Thu 14:01

Validate

diff --git a/README.org b/README.org index 3a0dd1c..c690aaa 100644 --- a/README.org +++ b/README.org @@ -3492,8 +3492,6 @@ trained staffers, monitored by a revision control system, etc. #+END_SRC The tasks below install Apache2 and edit its default configuration. -The global ~ServerName~ directive must be deleted because it seems to -interfere with mapping URLs to the correct virtual host. #+CAPTION: [[file:roles_t/core/tasks/main.yml][=roles_t/core/tasks/main.yml=]] #+BEGIN_SRC conf :tangle roles_t/core/tasks/main.yml @@ -3502,15 +3500,6 @@ interfere with mapping URLs to the correct virtual host. become: yes apt: pkg=apache2 -- name: Disable Apache2 server name. - become: yes - lineinfile: - path: /etc/apache2/apache2.conf - regexp: "([^#]+)ServerName (.*)" - backrefs: yes - line: "# \\1ServerName \\2" - notify: Restart Apache2. - - name: Enable Apache2 modules. become: yes apache2_module: diff --git a/roles_t/core/tasks/main.yml b/roles_t/core/tasks/main.yml index 19acbd4..a63a7f1 100644 --- a/roles_t/core/tasks/main.yml +++ b/roles_t/core/tasks/main.yml @@ -458,15 +458,6 @@ become: yes apt: pkg=apache2 -- name: Disable Apache2 server name. - become: yes - lineinfile: - path: /etc/apache2/apache2.conf - regexp: "([^#]+)ServerName (.*)" - backrefs: yes - line: "# \\1ServerName \\2" - notify: Restart Apache2. - - name: Enable Apache2 modules. become: yes apache2_module: -- 2.25.1