• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Issue Installing gitweb on Plesk

Ulf Samuelsson

New Pleskian
I have a git server running on a LInux VPS (Ubuntu 14.04) with Plesk 12.5.30.

To access the git repos I do

git clone git@<server>:/myrepo.git​

This requires an SSH public key to the server. I would like to install gitweb
so I can clone using the http protocol.


I have studing a lot of webpages, but have not gotten it to work.
My first problem was authentication, but I think I am past this,
and when I access the server using a web browser I end up with "FIle not found" or similar.

I added the following to the Apache Settings:

======================================
TraceEnable On

Alias /gitweb /usr/share/gitweb

<Directory /usr/share/gitweb>
AuthType Basic
AuthName "Restricted GitWeb"
AuthBasicProvider file
AuthUserFile /home/git/gitolite-http-authuserfile
AllowOverride None
# Require valid-user
Require all granted
Options +FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
</Directory>

SetEnv GIT_PROJECT_ROOT /home/git/repositories
SetEnv GITOLITE_HTTP_HOME /home/git
ScriptAlias /git/ $GITOLITE_HTTP_HOME/gitolite/src/gitolite-shell/
ScriptAlias /gitmob/ $GITOLITE_HTTP_HOME/gitolite/src/gitolite-shell/
SetEnv GIT_HTTP_EXPORT_ALL

<Location /git>
AuthType Basic
AuthName "Private Git Access"
#Require group committers
AuthBasicProvider file
Require valid-user
# AuthUserFile $GITOLITE_HTTP_HOME/gitolite-http-authuserfile
AuthUserFile /home/git/gitolite-http-authuserfile
Options +FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
</Location>

<Directory "/home/ulf/public_html">
Options +ExecCGI
AddHandler cgi-script .cgi .cgix .pl
</Directory>

ScriptAlias /ulf/ /home/ulf/public_html/
======================================

The last "Directory" was for testing only.

Studying the error_logs show that there is rewriting in progress.

I put a test file as "/home/ulf/public_html/scripts.cgi".
It is a simple shell script that writes a text/html.

When I try to access http://<website>/ulf/script.cgi I gett the following in my error_log.
(Heavily cleanup'ed to reduce line length)

===============
[www.emagii.com/SID][RID/initial] init rewrite engine with requested uri /ulf/script.cgi
[www.emagii.com/SID][RID/initial] applying pattern '^(.*)$' to uri '/ulf/script.cgi'
[www.emagii.com/SID][RID/initial] pass through /ulf/script.cgi
AH01626: authorization result of Require all granted: granted
AH01626: authorization result of <RequireAny>: granted
request.c(293): request authorized without authentication by access_checker_ex hook: /ulf/script.cgi
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] add path info postfix: HTTPDOCS/ulf -> HTTPDOCS/ulf/script.cgi
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] strip per-dir prefix: HTTPDOCS/ulf/script.cgi -> ulf/script.cgi
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] applying pattern '^index\\.php$' to uri 'ulf/script.cgi'
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] add path info postfix: HTTPDOCS/ulf -> HTTPDOCS/ulf/script.cgi
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] strip per-dir prefix: HTTPDOCS/ulf/script.cgi -> ulf/script.cgi
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] applying pattern '.' to uri 'ulf/script.cgi'
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] rewrite 'ulf/script.cgi' -> '/index.php'
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] trying to replace prefix HTTPDOCS/ with /
[www.emagii.com/SID][RID/initial] [perdir HTTPDOCS/] internal redirect with /index.php [INTERNAL REDIRECT]
[www.emagii.com/SID][RID/initial/redir#1] init rewrite engine with requested uri /index.php
[www.emagii.com/SID][RID/initial/redir#1] applying pattern '^(.*)$' to uri '/index.php'
[www.emagii.com/SID][RID/initial/redir#1] pass through /index.php
AH01626: authorization result of Require all granted: granted
AH01626: authorization result of <RequireAny>: granted
request.c(293): request authorized without authentication by access_checker_ex hook: /index.php
[www.emagii.com/SID][RID/initial/redir#1] [perdir HTTPDOCS/] strip per-dir prefix: HTTPDOCS/index.php -> index.php
[www.emagii.com/SID][RID/initial/redir#1] [perdir HTTPDOCS/] applying pattern '^index\\.php$' to uri 'index.php'
[www.emagii.com/SID][RID/initial/redir#1] [perdir HTTPDOCS/] pass through HTTPDOCS/index.php
util_script.c(601): Status line from script 'index.php': 404 Not Found
AH01502: headers: ap_headers_output_filter()
http_filters.c(979): Response sent with status 404

============
So apparently, the Plesk inner magic does not want to run the script.cgi.
It wants to run "index.php", which does not exist.

Why is this?
How do I get rid of this behaviour?

BR
Ulf
 
Back
Top