You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/10/01 18:28:27 UTC

[allura] branch master updated: Update docs to match git/httpd config from [12f1d6]

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 2bba5ed  Update docs to match git/httpd config from [12f1d6]
2bba5ed is described below

commit 2bba5ed2487e1638042572f258acca70f7d2a196
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Oct 1 14:24:45 2019 -0400

    Update docs to match git/httpd config from [12f1d6]
---
 Allura/docs/getting_started/scm_host.rst | 11 +++++++++--
 scripts/ApacheAccessHandler.py           | 24 +-----------------------
 2 files changed, 10 insertions(+), 25 deletions(-)

diff --git a/Allura/docs/getting_started/scm_host.rst b/Allura/docs/getting_started/scm_host.rst
index 3914f8a..39e84f7 100644
--- a/Allura/docs/getting_started/scm_host.rst
+++ b/Allura/docs/getting_started/scm_host.rst
@@ -49,6 +49,10 @@ and subsequent chapters.
     sudo chmod 775 /srv/*  # make sure apache can read the repo dirs
     sudo apt-get install apache2
     sudo a2enmod cgi
+    # allow the apache user to sudo (used by git-http-backend-wrapper.sh see notes in that file)
+    sudo adduser www-data sudo
+    sudo echo '%sudo  ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/sudo_group_passwordless
+
     sudo vi /etc/apache2/sites-available/default
 
 And add the following text within the :code:`<VirtualHost>` block:
@@ -57,7 +61,7 @@ And add the following text within the :code:`<VirtualHost>` block:
 
     SetEnv GIT_PROJECT_ROOT /srv/git
     SetEnv GIT_HTTP_EXPORT_ALL
-    ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
+    ScriptAlias /git/ /usr/lib/git-core/git-http-backend-wrapper.sh/
 
     # no authentication required at all - for testing purposes
     SetEnv REMOTE_USER=git-allura
@@ -198,6 +202,8 @@ access handler, e.g.:
 
     sudo vi /etc/apache2/sites-available/default
 
+Remove the `<Location>` block and `SetEnv REMOTE_USER=git-allura` from earlier.
+
 .. code-block:: apache
 
     <LocationMatch "^/(git|svn|hg)/">
@@ -229,7 +235,8 @@ access handler, e.g.:
 To test that it's working, run: :command:`git ls-remote
 http://localhost/git/p/test/git/`. If there is no output, that is fine (it's an empty
 repo). If it errors, look in :file:`/var/log/apache2/error.log` for the error
-message.
+message.  Increase logging with the `LogLevel <https://httpd.apache.org/docs/2.4/mod/core.html#loglevel>`_ directive
+if needed for further debugging.
 
 .. warning::
 
diff --git a/scripts/ApacheAccessHandler.py b/scripts/ApacheAccessHandler.py
index 942e5fc..70055d1 100644
--- a/scripts/ApacheAccessHandler.py
+++ b/scripts/ApacheAccessHandler.py
@@ -22,29 +22,7 @@ An Apache authorization handler for Allura
 * Check fuse/accessfs.py for more details on the path mangling
   magic
 
-Here is a quick example for your apache settings (assuming ProxyPass)
-
-    SetEnv GIT_PROJECT_ROOT /opt/allura/scm/git
-    SetEnv GIT_HTTP_EXPORT_ALL
-    ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
-
-    <Location "/git/">
-        # new for httpd 2.4
-        Require all granted
-
-        AddHandler mod_python .py
-        PythonAccessHandler /path/to/ApacheAccessHandler.py
-        PythonDebug On
-
-        AuthType Basic
-        AuthName "Git Access"
-        AuthBasicAuthoritative off
-        PythonOption ALLURA_PERM_URL https://127.0.0.1/auth/repo_permissions
-        PythonOption ALLURA_AUTH_URL https://127.0.0.1/auth/do_login
-        # for 'requests' lib only, doesn't have to be full allura venv
-        PythonOption ALLURA_VIRTUALENV /var/local/env-allura
-    </Location>
-
+See scm_host.rst for documentation on how to configure Apache with this handler file.
 
 This could also use the Allura code and authorize directly, but it's useful to be able to run
 this authorization code without Allura set up and configured on the git host.