From: Matt Birkholz <matt@birchwood-abbey.net> Date: Thu, 28 Mar 2024 18:56:38 +0000 (-0500) Subject: Punt task "Disable Apache2 server name." (for Debian 12). X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=87897355b014ce73ec39121e973d205c820c181b;p=Institute Punt task "Disable Apache2 server name." (for Debian 12). Debian 12 does not configure Apache with a ServerName (as Debian 11 did?). --- 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"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> -<!-- 2024-03-11 Mon 17:33 --> +<!-- 2024-03-28 Thu 14:01 --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>A Small Institute</title> @@ -48,7 +48,7 @@ connects to Front making the institute email, cloud, etc. available to members off campus. </p> -<pre class="example" id="org842edc1"> +<pre class="example" id="orgb86bbff"> = _|||_ =-The-Institute-= @@ -1022,7 +1022,7 @@ example result follows the code. </pre> </div> -<div class="TEXT" id="orgde5cea3"> +<div class="TEXT" id="org4170748"> <p> => 10.62.17.0/24 </p> @@ -1475,7 +1475,7 @@ USB-Ethernet adapter, or a wireless adapter connected to a campground Wi-Fi access point, etc.</li> </ol> -<pre class="example" id="org6d09f97"> +<pre class="example" id="org7bd4bb7"> =============== | ================================================== | Premises (Campus ISP) @@ -1498,7 +1498,7 @@ This avoids the need for a second Wi-Fi access point and leads to the following topology. </p> -<pre class="example" id="orgc1e3280"> +<pre class="example" id="org266a7ce"> =============== | ================================================== | Premises (House ISP) @@ -1651,8 +1651,8 @@ The <code>all</code> role contains tasks that are executed on all of the institute's servers. At the moment there is just the one. </p> </div> -<div id="outline-container-org4e59c64" class="outline-3"> -<h3 id="org4e59c64"><span class="section-number-3">6.1.</span> Include Particulars</h3> +<div id="outline-container-org447849b" class="outline-3"> +<h3 id="org447849b"><span class="section-number-3">6.1.</span> Include Particulars</h3> <div class="outline-text-3" id="text-6-1"> <p> The <code>all</code> 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. </p> </div> -<div id="outline-container-org9ff2317" class="outline-3"> -<h3 id="org9ff2317"><span class="section-number-3">7.1.</span> Include Particulars</h3> +<div id="outline-container-orgf78c136" class="outline-3"> +<h3 id="orgf78c136"><span class="section-number-3">7.1.</span> Include Particulars</h3> <div class="outline-text-3" id="text-7-1"> <p> The first task, as in <a href="#orgd60dcd1">The All Role</a>, is to include the institute @@ -1819,8 +1819,8 @@ membership roll, so these are included was well. </div> </div> </div> -<div id="outline-container-org2ecf1fc" class="outline-3"> -<h3 id="org2ecf1fc"><span class="section-number-3">7.2.</span> Configure Hostname</h3> +<div id="outline-container-org4c3996e" class="outline-3"> +<h3 id="org4c3996e"><span class="section-number-3">7.2.</span> Configure Hostname</h3> <div class="outline-text-3" id="text-7-2"> <p> This task ensures that Front's <q>/etc/hostname</q> and <q>/etc/mailname</q> are @@ -1850,8 +1850,8 @@ delivery. </div> </div> </div> -<div id="outline-container-org0365651" class="outline-3"> -<h3 id="org0365651"><span class="section-number-3">7.3.</span> Add Administrator to System Groups</h3> +<div id="outline-container-orgab509e9" class="outline-3"> +<h3 id="orgab509e9"><span class="section-number-3">7.3.</span> Add Administrator to System Groups</h3> <div class="outline-text-3" id="text-7-3"> <p> The administrator often needs to read (directories of) log files owned @@ -1910,8 +1910,8 @@ those stored in <a href="Secret/ssh_front/etc/ssh/"><q>Secret/ssh_front/etc/ssh/ </div> </div> </div> -<div id="outline-container-org4dc1eb8" class="outline-3"> -<h3 id="org4dc1eb8"><span class="section-number-3">7.5.</span> Configure Monkey</h3> +<div id="outline-container-orgc79baad" class="outline-3"> +<h3 id="orgc79baad"><span class="section-number-3">7.5.</span> Configure Monkey</h3> <div class="outline-text-3" id="text-7-5"> <p> 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. </div> </div> </div> -<div id="outline-container-orged061bf" class="outline-3"> -<h3 id="orged061bf"><span class="section-number-3">7.7.</span> Install Unattended Upgrades</h3> +<div id="outline-container-orge010cca" class="outline-3"> +<h3 id="orge010cca"><span class="section-number-3">7.7.</span> Install Unattended Upgrades</h3> <div class="outline-text-3" id="text-7-7"> <p> 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. </div> </div> </div> -<div id="outline-container-org328bd8d" class="outline-3"> -<h3 id="org328bd8d"><span class="section-number-3">7.8.</span> Configure User Accounts</h3> +<div id="outline-container-org4a578a7" class="outline-3"> +<h3 id="org4a578a7"><span class="section-number-3">7.8.</span> Configure User Accounts</h3> <div class="outline-text-3" id="text-7-8"> <p> User accounts are created immediately so that Postfix and Dovecot can @@ -2027,8 +2027,8 @@ recipient" replies. The <a href="#orge7fe793">Account Management</a> chapter de </div> </div> </div> -<div id="outline-container-org2ab49c8" class="outline-3"> -<h3 id="org2ab49c8"><span class="section-number-3">7.9.</span> Install Server Certificate</h3> +<div id="outline-container-org1a2f9ae" class="outline-3"> +<h3 id="org1a2f9ae"><span class="section-number-3">7.9.</span> Install Server Certificate</h3> <div class="outline-text-3" id="text-7-9"> <p> The servers on Front use the same certificate (and key) to @@ -2255,8 +2255,8 @@ created by a more specialized role. </div> </div> </div> -<div id="outline-container-org26190b7" class="outline-3"> -<h3 id="org26190b7"><span class="section-number-3">7.12.</span> Configure Dovecot IMAPd</h3> +<div id="outline-container-orgd1b1ae5" class="outline-3"> +<h3 id="orgd1b1ae5"><span class="section-number-3">7.12.</span> Configure Dovecot IMAPd</h3> <div class="outline-text-3" id="text-7-12"> <p> Front uses Dovecot's IMAPd to allow user Fetchmail jobs on Core to @@ -2612,8 +2612,8 @@ the users' <q>~/Public/HTML/</q> directories. </div> </div> </div> -<div id="outline-container-orgf920b5f" class="outline-3"> -<h3 id="orgf920b5f"><span class="section-number-3">7.14.</span> Configure OpenVPN</h3> +<div id="outline-container-org556ffbd" class="outline-3"> +<h3 id="org556ffbd"><span class="section-number-3">7.14.</span> Configure OpenVPN</h3> <div class="outline-text-3" id="text-7-14"> <p> 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 <a href="#org8d60b7b">The Core Machine</a>.) </p> </div> -<div id="outline-container-orga30cdd5" class="outline-3"> -<h3 id="orga30cdd5"><span class="section-number-3">8.1.</span> Include Particulars</h3> +<div id="outline-container-org9c95097" class="outline-3"> +<h3 id="org9c95097"><span class="section-number-3">8.1.</span> Include Particulars</h3> <div class="outline-text-3" id="text-8-1"> <p> The first task, as in <a href="#org9240129">The Front Role</a>, is to include the institute @@ -2919,8 +2919,8 @@ particulars and membership roll. </div> </div> </div> -<div id="outline-container-orgc3412ed" class="outline-3"> -<h3 id="orgc3412ed"><span class="section-number-3">8.2.</span> Configure Hostname</h3> +<div id="outline-container-org5043c05" class="outline-3"> +<h3 id="org5043c05"><span class="section-number-3">8.2.</span> Configure Hostname</h3> <div class="outline-text-3" id="text-8-2"> <p> This task ensures that Core's <q>/etc/hostname</q> and <q>/etc/mailname</q> are @@ -2953,8 +2953,8 @@ proper email delivery. </div> </div> </div> -<div id="outline-container-orge61e556" class="outline-3"> -<h3 id="orge61e556"><span class="section-number-3">8.3.</span> Configure Systemd Resolved</h3> +<div id="outline-container-org065d2c9" class="outline-3"> +<h3 id="org065d2c9"><span class="section-number-3">8.3.</span> Configure Systemd Resolved</h3> <div class="outline-text-3" id="text-8-3"> <p> Core runs the campus name server, so Resolved is configured to use it @@ -3377,8 +3377,8 @@ craps up <q>/var/log/</q> and the Systemd journal. </div> </div> </div> -<div id="outline-container-org86f8fed" class="outline-3"> -<h3 id="org86f8fed"><span class="section-number-3">8.7.</span> Add Administrator to System Groups</h3> +<div id="outline-container-org52d18ca" class="outline-3"> +<h3 id="org52d18ca"><span class="section-number-3">8.7.</span> Add Administrator to System Groups</h3> <div class="outline-text-3" id="text-8-7"> <p> The administrator often needs to read (directories of) log files owned @@ -3398,8 +3398,8 @@ these groups speeds up debugging. </div> </div> </div> -<div id="outline-container-orgc79baad" class="outline-3"> -<h3 id="orgc79baad"><span class="section-number-3">8.8.</span> Configure Monkey</h3> +<div id="outline-container-orgd77b9bb" class="outline-3"> +<h3 id="orgd77b9bb"><span class="section-number-3">8.8.</span> Configure Monkey</h3> <div class="outline-text-3" id="text-8-8"> <p> The small institute runs cron jobs and web scripts that generate @@ -3466,8 +3466,8 @@ described in <a href="#org1ac6235">*Configure Apache2</a>). </div> </div> </div> -<div id="outline-container-org1c76b4a" class="outline-3"> -<h3 id="org1c76b4a"><span class="section-number-3">8.9.</span> Install Unattended Upgrades</h3> +<div id="outline-container-org5613d36" class="outline-3"> +<h3 id="org5613d36"><span class="section-number-3">8.9.</span> Install Unattended Upgrades</h3> <div class="outline-text-3" id="text-8-9"> <p> The institute prefers to install security updates as soon as possible. @@ -3499,8 +3499,8 @@ with Nextcloud on the command line. </div> </div> </div> -<div id="outline-container-org4a578a7" class="outline-3"> -<h3 id="org4a578a7"><span class="section-number-3">8.11.</span> Configure User Accounts</h3> +<div id="outline-container-orga1c82d1" class="outline-3"> +<h3 id="orga1c82d1"><span class="section-number-3">8.11.</span> Configure User Accounts</h3> <div class="outline-text-3" id="text-8-11"> <p> User accounts are created immediately so that backups can begin @@ -3542,8 +3542,8 @@ describes the <code>members</code> and <code>usernames</code> variables. </div> </div> </div> -<div id="outline-container-org8af85b3" class="outline-3"> -<h3 id="org8af85b3"><span class="section-number-3">8.12.</span> Install Server Certificate</h3> +<div id="outline-container-orga74f50b" class="outline-3"> +<h3 id="orga74f50b"><span class="section-number-3">8.12.</span> Install Server Certificate</h3> <div class="outline-text-3" id="text-8-12"> <p> The servers on Core use the same certificate (and key) to authenticate @@ -3767,8 +3767,8 @@ installed by more specialized roles. </div> </div> </div> -<div id="outline-container-orgd1b1ae5" class="outline-3"> -<h3 id="orgd1b1ae5"><span class="section-number-3">8.16.</span> Configure Dovecot IMAPd</h3> +<div id="outline-container-org6b38a00" class="outline-3"> +<h3 id="org6b38a00"><span class="section-number-3">8.16.</span> Configure Dovecot IMAPd</h3> <div class="outline-text-3" id="text-8-16"> <p> 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. <p> The tasks below install Apache2 and edit its default configuration. -The global <code>ServerName</code> directive must be deleted because it seems to -interfere with mapping URLs to the correct virtual host. </p> <div class="org-src-container"> @@ -4168,15 +4166,6 @@ interfere with mapping URLs to the correct virtual host. become: yes <span class="org-variable-name">apt: pkg</span>=apache2 -- name: Disable Apache2 server name. - become: yes - lineinfile: - path: /etc/apache2/apache2.conf - regexp: <span class="org-string">"([^#]+)ServerName (.*)"</span> - backrefs: yes - line: <span class="org-string">"# \\1ServerName \\2"</span> - 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. </p> </div> -<div id="outline-container-org9d95455" class="outline-3"> -<h3 id="org9d95455"><span class="section-number-3">9.1.</span> Include Particulars</h3> +<div id="outline-container-org3ef4117" class="outline-3"> +<h3 id="org3ef4117"><span class="section-number-3">9.1.</span> Include Particulars</h3> <div class="outline-text-3" id="text-9-1"> <p> The following should be familiar boilerplate by now. @@ -5921,8 +5910,8 @@ the daemon listens <i>only</i> on the Gate-WiFi network interface. </div> </div> </div> -<div id="outline-container-org1a2f9ae" class="outline-3"> -<h3 id="org1a2f9ae"><span class="section-number-3">9.6.</span> Install Server Certificate</h3> +<div id="outline-container-org2e943b2" class="outline-3"> +<h3 id="org2e943b2"><span class="section-number-3">9.6.</span> Install Server Certificate</h3> <div class="outline-text-3" id="text-9-6"> <p> The (OpenVPN) server on Gate uses an institute certificate (and key) @@ -5949,8 +5938,8 @@ and Front) do. </div> </div> </div> -<div id="outline-container-org556ffbd" class="outline-3"> -<h3 id="org556ffbd"><span class="section-number-3">9.7.</span> Configure OpenVPN</h3> +<div id="outline-container-orge879e54" class="outline-3"> +<h3 id="orge879e54"><span class="section-number-3">9.7.</span> Configure OpenVPN</h3> <div class="outline-text-3" id="text-9-7"> <p> 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. </p> </div> -<div id="outline-container-org447849b" class="outline-3"> -<h3 id="org447849b"><span class="section-number-3">10.1.</span> Include Particulars</h3> +<div id="outline-container-orge96dcaf" class="outline-3"> +<h3 id="orge96dcaf"><span class="section-number-3">10.1.</span> Include Particulars</h3> <div class="outline-text-3" id="text-10-1"> <p> The following should be familiar boilerplate by now. @@ -6094,8 +6083,8 @@ The following should be familiar boilerplate by now. </div> </div> </div> -<div id="outline-container-org4c3996e" class="outline-3"> -<h3 id="org4c3996e"><span class="section-number-3">10.2.</span> Configure Hostname</h3> +<div id="outline-container-org8f79a3d" class="outline-3"> +<h3 id="org8f79a3d"><span class="section-number-3">10.2.</span> Configure Hostname</h3> <div class="outline-text-3" id="text-10-2"> <p> Clients should be using the expected host name. @@ -6122,8 +6111,8 @@ Clients should be using the expected host name. </div> </div> </div> -<div id="outline-container-org065d2c9" class="outline-3"> -<h3 id="org065d2c9"><span class="section-number-3">10.3.</span> Configure Systemd Resolved</h3> +<div id="outline-container-org89d3c10" class="outline-3"> +<h3 id="org89d3c10"><span class="section-number-3">10.3.</span> Configure Systemd Resolved</h3> <div class="outline-text-3" id="text-10-3"> <p> Campus machines use the campus name server on Core (or <code>dns.google</code>), @@ -6194,8 +6183,8 @@ and file timestamps. </div> </div> </div> -<div id="outline-container-orgab509e9" class="outline-3"> -<h3 id="orgab509e9"><span class="section-number-3">10.5.</span> Add Administrator to System Groups</h3> +<div id="outline-container-orgc830621" class="outline-3"> +<h3 id="orgc830621"><span class="section-number-3">10.5.</span> Add Administrator to System Groups</h3> <div class="outline-text-3" id="text-10-5"> <p> The administrator often needs to read (directories of) log files owned @@ -6215,8 +6204,8 @@ these groups speeds up debugging. </div> </div> </div> -<div id="outline-container-orge010cca" class="outline-3"> -<h3 id="orge010cca"><span class="section-number-3">10.6.</span> Install Unattended Upgrades</h3> +<div id="outline-container-org8c95d10" class="outline-3"> +<h3 id="org8c95d10"><span class="section-number-3">10.6.</span> Install Unattended Upgrades</h3> <div class="outline-text-3" id="text-10-6"> <p> 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. </div></div> <div id="postamble" class="status"> <p class="author">Author: Matt Birkholz</p> -<p class="date">Created: 2024-03-11 Mon 17:33</p> +<p class="date">Created: 2024-03-28 Thu 14:01</p> <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p> </div> </body> 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: