state: restarted
#+END_SRC
-** Configure CGit on Front
-
-CGit is handled similarly, modifying =/etc/cgitrc= to reference a
-~CGIT_SCANPATH~ environment variable set by Apache re-write rules.
-The resulting Apache directives are given in ~apache-cgit~ and the
-Ansible tasks in ~apache-cgit-tasks~, for both Front and Core.
-
-#+NAME: apache-cgit
-#+CAPTION: ~apache-cgit~
-#+BEGIN_SRC conf
-
-ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-Alias /cgit-css/ /usr/share/cgit/
-<Directory "/usr/lib/cgit/">
- AllowOverride None
- Options ExecCGI FollowSymlinks
- Require all granted
-</Directory>
-RewriteRule ^/cgit?(/.*)$ \
- /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
- /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
-#+END_SRC
-
-#+NAME: apache-cgit-tasks
-#+CAPTION: ~apache-cgi-tasks~
-#+BEGIN_SRC conf
-- name: Install CGit.
- become: yes
- apt: pkg=cgit
-
-- name: Disable CGit default configuration.
- become: yes
- command:
- cmd: a2disconf -q cgit
- removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
- become: yes
- lineinfile:
- path: /etc/cgitrc
- regexp: "^scan-path *="
- line: "scan-path=$CGIT_SCANPATH"
- notify: Restart Apache2.
-#+END_SRC
-
** Configure Apache for Abbey Documentation
Some of the directives added to the =-vhost.conf= file are needed by
The abbey simply creates a =birchwood-abbey.net-vhost.conf= file in
=/etc/apache2/sites-available/=.
-The following task adds the [[apache-abbey][~apache-abbey~]], [[apache-photos][~apache-photos~]],
-[[apache-gitweb][~apache-gitweb~]], and [[apache-cgit][~apache-cgit~]] directives described above to the
-=-vhost.conf= file, and includes =options-ssl-apache.conf= from
-=/etc/letsencrypt/=. The rest of the Let's Encrypt configuration is
-discussed in the following [[*Install Let's Encrypt][Install Let's Encrypt]] section.
+The following task adds the [[apache-abbey][~apache-abbey~]], [[apache-photos][~apache-photos~]], and
+[[apache-gitweb][~apache-gitweb~]] directives described above to the =-vhost.conf= file,
+and includes =options-ssl-apache.conf= from =/etc/letsencrypt/=. The
+rest of the Let's Encrypt configuration is discussed in the following
+[[*Install Let's Encrypt][Install Let's Encrypt]] section.
#+CAPTION: =roles_t/abbey-front/tasks/main.yml=
#+BEGIN_SRC conf :tangle roles_t/abbey-front/tasks/main.yml :noweb yes
<<apache-abbey>>
<<apache-photos>>
<<apache-gitweb>>
- <<apache-cgit>>
IncludeOptional /etc/letsencrypt/options-ssl-apache.conf
dest: /etc/apache2/sites-available/{{ domain_name }}-vhost.conf
notify: Restart Apache2.
<<apache-gitweb-tasks>>
-
-<<apache-cgit-tasks>>
#+END_SRC
#+CAPTION: =roles_t/abbey-front/handlers/main.yml=
The Apache2 configuration on Core specifies three web sites (live,
test, and campus). The live and test sites must operate just like the
site on Front. Their configurations include the same [[apache-abbey][~apache-abbey~]],
-[[apache-photos][~apache-photos~]], [[apache-gitweb][~apache-gitweb~]], and [[apache-cgit][~apache-cgit~]] used on Front.
+[[apache-photos][~apache-photos~]], and [[apache-gitweb][~apache-gitweb~]] used on Front.
#+CAPTION: =roles_t/abbey-core/tasks/main.yml=
#+BEGIN_SRC conf :tangle roles_t/abbey-core/tasks/main.yml :noweb yes
<<apache-abbey>>
<<apache-photos>>
<<apache-gitweb>>
- <<apache-cgit>>
dest: /etc/apache2/sites-available/live-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
<<apache-abbey>>
<<apache-photos>>
<<apache-gitweb>>
- <<apache-cgit>>
dest: /etc/apache2/sites-available/test-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
<<apache-gitweb-tasks>>
-
-<<apache-cgit-tasks>>
#+END_SRC
#+CAPTION: =roles_t/abbey-core/handlers/main.yml=
site. This is a debugging convenience, making some HTML documentation
more accessible, especially the documentation of software installed on
Core and not on typical desktop clients. Also included: the Apache2
-directives that enable user Git publishing with Gitweb and CGit
-(defined [[apache-gitweb][here]] and [[apache-cgit][here]] respectively).
+directives that enable user Git publishing with Gitweb (defined [[apache-gitweb][here]]).
#+CAPTION: =roles_t/abbey-core/tasks/main.yml=
#+BEGIN_SRC conf :tangle roles_t/abbey-core/tasks/main.yml :noweb yes
Options Indexes
</Directory>
<<apache-gitweb>>
- <<apache-cgit>>
dest: /etc/apache2/sites-available/www-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
/cgi-bin/gitweb.cgi$3 \
[QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-
- ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
- Alias /cgit-css/ /usr/share/cgit/
- <Directory "/usr/lib/cgit/">
- AllowOverride None
- Options ExecCGI FollowSymlinks
- Require all granted
- </Directory>
- RewriteRule ^/cgit?(/.*)$ \
- /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
- RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
- /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
dest: /etc/apache2/sites-available/live-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
/cgi-bin/gitweb.cgi$3 \
[QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-
- ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
- Alias /cgit-css/ /usr/share/cgit/
- <Directory "/usr/lib/cgit/">
- AllowOverride None
- Options ExecCGI FollowSymlinks
- Require all granted
- </Directory>
- RewriteRule ^/cgit?(/.*)$ \
- /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
- RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
- /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
dest: /etc/apache2/sites-available/test-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
dest: /etc/gitweb.conf
mode: u=rw,g=r,o=r
-- name: Install CGit.
- become: yes
- apt: pkg=cgit
-
-- name: Disable CGit default configuration.
- become: yes
- command:
- cmd: a2disconf -q cgit
- removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
- become: yes
- lineinfile:
- path: /etc/cgitrc
- regexp: "^scan-path *="
- line: "scan-path=$CGIT_SCANPATH"
- notify: Restart Apache2.
-
- name: Configure house website.
become: yes
copy:
RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
/cgi-bin/gitweb.cgi$3 \
[QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-
- ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
- Alias /cgit-css/ /usr/share/cgit/
- <Directory "/usr/lib/cgit/">
- AllowOverride None
- Options ExecCGI FollowSymlinks
- Require all granted
- </Directory>
- RewriteRule ^/cgit?(/.*)$ \
- /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
- RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
- /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
dest: /etc/apache2/sites-available/www-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
/cgi-bin/gitweb.cgi$3 \
[QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-
- ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
- Alias /cgit-css/ /usr/share/cgit/
- <Directory "/usr/lib/cgit/">
- AllowOverride None
- Options ExecCGI FollowSymlinks
- Require all granted
- </Directory>
- RewriteRule ^/cgit?(/.*)$ \
- /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
- RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
- /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
IncludeOptional /etc/letsencrypt/options-ssl-apache.conf
dest: /etc/apache2/sites-available/{{ domain_name }}-vhost.conf
notify: Restart Apache2.
dest: /etc/gitweb.conf
mode: u=rw,g=r,o=r
-- name: Install CGit.
- become: yes
- apt: pkg=cgit
-
-- name: Disable CGit default configuration.
- become: yes
- command:
- cmd: a2disconf -q cgit
- removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
- become: yes
- lineinfile:
- path: /etc/cgitrc
- regexp: "^scan-path *="
- line: "scan-path=$CGIT_SCANPATH"
- notify: Restart Apache2.
-
- name: Configure Apache log archival.
become: yes
lineinfile: