• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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