Corrections to hosting HG in Apache.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 07 May 2023 11:58:25 +0300
changeset 16 667a0417c36a
parent 15 3f7b202af99e
child 17 141de5177ee8
Corrections to hosting HG in Apache.
deb/apache-register-hg.bash
--- 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
+