Corrections to hosting HG in Apache.
--- a/deb/apache-register-hg.bash Sun May 07 11:16:52 2023 +0300
+++ b/deb/apache-register-hg.bash Sun May 07 11:58:25 2023 +0300
@@ -2,6 +2,9 @@
set -x
+a2enmod cgi
+service apache2 restart
+
mkdir -p /srv/hg
chown user:user /srv/hg
@@ -36,17 +39,19 @@
cat <<EOF >/etc/apache2/sites-available/hg.conf
<VirtualHost hg.defun.work:*>
- DocumentRoot /srv/hg
+ DocumentRoot /srv/hg
- ScriptAliasMatch ^/(.*) /srv/hg/hgweb.cgi$1
+ ScriptAliasMatch ^/(.*) /srv/hg/hgweb.cgi/$1
<Directory "/srv/hg/">
- Options ExecCGI FollowSymLinks
+ Options +ExecCGI
Require all granted
AllowOverride None
+ AddHandler cgi-script .cgi
</Directory>
</VirtualHost>
EOF
a2ensite hg
-# service apache2 restart
+systemctl reload apache2
+