From: Matt Birkholz Date: Sun, 11 Jan 2026 21:53:11 +0000 (-0700) Subject: Move Gitweb configuration and fixup whitespace. Wordsmith. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7d2879eeadf34f221cf8fc09a03473c857d1f90c;p=Network.git Move Gitweb configuration and fixup whitespace. Wordsmith. Took out obsolete instructions for configuring a Raspberry Pi. --- diff --git a/README.org b/README.org index ab7d358..63bcb59 100644 --- a/README.org +++ b/README.org @@ -339,7 +339,6 @@ lists the repositories found in =/var/www/git/=. #+NAME: apache-gitweb #+CAPTION: ~apache-gitweb~ #+BEGIN_SRC conf - Alias /gitweb-static/ /usr/share/gitweb/static/ Options MultiViews @@ -390,7 +389,7 @@ web site =/favicon.ico=. #+NAME: gitweb-tasks #+CAPTION: ~gitweb-tasks~ #+BEGIN_SRC conf -- name: Enable Apache2 rewrite module for Gitweb. +- name: Enable Apache2 rewrite module. become: yes apache2_module: name=rewrite notify: Restart Apache2. @@ -400,7 +399,7 @@ web site =/favicon.ico=. apache2_module: name=cgid notify: Restart Apache2. -- name: Install libcgi-pm-perl for Gitweb. +- name: Install libcgi-pm-perl. become: yes apt: pkg=libcgi-pm-perl @@ -489,7 +488,6 @@ matching configurations for accurate previews and tests. #+NAME: apache-photos #+CAPTION: ~apache-photos~ #+BEGIN_SRC conf - RedirectMatch /Photos$ /Photos/ RedirectMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])$ \ /Photos/$1_$2_$3/ @@ -523,9 +521,11 @@ rest of the Let's Encrypt configuration is discussed in the following docroot: /home/www copy: content: | + <> + <> + <> - <> IncludeOptional /etc/letsencrypt/options-ssl-apache.conf dest: /etc/apache2/sites-available/birchwood-abbey.net-vhost.conf @@ -1038,9 +1038,11 @@ site on Front. Their configurations include the same [[apache-abbey][~apache-ab docroot: /WWW/live copy: content: | + <> + <> + <> - <> dest: /etc/apache2/sites-available/live-vhost.conf mode: u=rw,g=r,o=r notify: Restart Apache2. @@ -1051,9 +1053,11 @@ site on Front. Their configurations include the same [[apache-abbey][~apache-ab docroot: /WWW/test copy: content: | + <> + <> + <> - <> dest: /etc/apache2/sites-available/test-vhost.conf mode: u=rw,g=r,o=r notify: Restart Apache2. @@ -1078,6 +1082,7 @@ directives that enable user Git publishing with Gitweb (defined [[apache-gitweb] Options Indexes + <> dest: /etc/apache2/sites-available/www-vhost.conf mode: u=rw,g=r,o=r @@ -3210,11 +3215,6 @@ SSD. A fresh install should go something like this: - Right click on the desktop (background) and choose Preferences. In the Control Centre choose Interfaces in the left side bar and toggle SSH on. - -- Run ~sudo raspi-config~ and use the following menu items. - + S4 Hostname (Set name for this computer on a network): new - + I1 SSH (Enable/disable remote command line access using SSH): enable - + A1 Expand Filesystem (Ensures that all of the SD card is available) - [[*Update From Cloister Apt Cache][Update From Cloister Apt Cache]] - [[*Authorize Remote Administration][Authorize Remote Administration]] - [[*Configure with Ansible][Configure with Ansible]] diff --git a/roles_t/abbey-core/tasks/main.yml b/roles_t/abbey-core/tasks/main.yml index cd99079..b6700db 100644 --- a/roles_t/abbey-core/tasks/main.yml +++ b/roles_t/abbey-core/tasks/main.yml @@ -95,7 +95,7 @@ service: git-daemon enabled: yes -- name: Enable Apache2 rewrite module for Gitweb. +- name: Enable Apache2 rewrite module. become: yes apache2_module: name=rewrite notify: Restart Apache2. @@ -105,7 +105,7 @@ apache2_module: name=cgid notify: Restart Apache2. -- name: Install libcgi-pm-perl for Gitweb. +- name: Install libcgi-pm-perl. become: yes apt: pkg=libcgi-pm-perl @@ -135,11 +135,22 @@ docroot: /WWW/live copy: content: | + Alias /gitweb-static/ /usr/share/gitweb/static/ + + Options MultiViews + + RewriteEngine on + RewriteRule ^/git(/.*)?$ \ + /cgi-bin/gitweb.cgi$1 [QSA,L,PT] + RewriteRule ^/\~([^\/]+)/git(/.*)?$ \ + /cgi-bin/gitweb.cgi$2 \ + [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT] + AllowOverride Indexes FileInfo Options +Indexes +FollowSymLinks - + RedirectMatch /Photos$ /Photos/ RedirectMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])$ \ /Photos/$1_$2_$3/ @@ -148,7 +159,16 @@ AliasMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])/$ \ {{ docroot }}/Photos/$1/$2/$3/index.html AliasMatch /Photos/$ {{ docroot }}/Photos/index.html - + dest: /etc/apache2/sites-available/live-vhost.conf + mode: u=rw,g=r,o=r + notify: Restart Apache2. + +- name: Configure test website. + become: yes + vars: + docroot: /WWW/test + copy: + content: | Alias /gitweb-static/ /usr/share/gitweb/static/ Options MultiViews @@ -159,21 +179,12 @@ RewriteRule ^/\~([^\/]+)/git(/.*)?$ \ /cgi-bin/gitweb.cgi$2 \ [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT] - dest: /etc/apache2/sites-available/live-vhost.conf - mode: u=rw,g=r,o=r - notify: Restart Apache2. -- name: Configure test website. - become: yes - vars: - docroot: /WWW/test - copy: - content: | AllowOverride Indexes FileInfo Options +Indexes +FollowSymLinks - + RedirectMatch /Photos$ /Photos/ RedirectMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])$ \ /Photos/$1_$2_$3/ @@ -182,17 +193,6 @@ AliasMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])/$ \ {{ docroot }}/Photos/$1/$2/$3/index.html AliasMatch /Photos/$ {{ docroot }}/Photos/index.html - - Alias /gitweb-static/ /usr/share/gitweb/static/ - - Options MultiViews - - RewriteEngine on - RewriteRule ^/git(/.*)?$ \ - /cgi-bin/gitweb.cgi$1 [QSA,L,PT] - RewriteRule ^/\~([^\/]+)/git(/.*)?$ \ - /cgi-bin/gitweb.cgi$2 \ - [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT] dest: /etc/apache2/sites-available/test-vhost.conf mode: u=rw,g=r,o=r notify: Restart Apache2. @@ -205,7 +205,7 @@ Options Indexes - + Alias /gitweb-static/ /usr/share/gitweb/static/ Options MultiViews diff --git a/roles_t/abbey-front/tasks/main.yml b/roles_t/abbey-front/tasks/main.yml index 11b3a72..2615f65 100644 --- a/roles_t/abbey-front/tasks/main.yml +++ b/roles_t/abbey-front/tasks/main.yml @@ -94,7 +94,7 @@ service: git-daemon enabled: yes -- name: Enable Apache2 rewrite module for Gitweb. +- name: Enable Apache2 rewrite module. become: yes apache2_module: name=rewrite notify: Restart Apache2. @@ -104,7 +104,7 @@ apache2_module: name=cgid notify: Restart Apache2. -- name: Install libcgi-pm-perl for Gitweb. +- name: Install libcgi-pm-perl. become: yes apt: pkg=libcgi-pm-perl @@ -134,11 +134,22 @@ docroot: /home/www copy: content: | + Alias /gitweb-static/ /usr/share/gitweb/static/ + + Options MultiViews + + RewriteEngine on + RewriteRule ^/git(/.*)?$ \ + /cgi-bin/gitweb.cgi$1 [QSA,L,PT] + RewriteRule ^/\~([^\/]+)/git(/.*)?$ \ + /cgi-bin/gitweb.cgi$2 \ + [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT] + AllowOverride Indexes FileInfo Options +Indexes +FollowSymLinks - + RedirectMatch /Photos$ /Photos/ RedirectMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])$ \ /Photos/$1_$2_$3/ @@ -147,17 +158,6 @@ AliasMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])/$ \ {{ docroot }}/Photos/$1/$2/$3/index.html AliasMatch /Photos/$ {{ docroot }}/Photos/index.html - - Alias /gitweb-static/ /usr/share/gitweb/static/ - - Options MultiViews - - RewriteEngine on - RewriteRule ^/git(/.*)?$ \ - /cgi-bin/gitweb.cgi$1 [QSA,L,PT] - RewriteRule ^/\~([^\/]+)/git(/.*)?$ \ - /cgi-bin/gitweb.cgi$2 \ - [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT] IncludeOptional /etc/letsencrypt/options-ssl-apache.conf dest: /etc/apache2/sites-available/birchwood-abbey.net-vhost.conf