1

I setup GIT and wanted GITWeb on my RHEL with HTTPD 2.2 server. When i try to start my HTTPD server i'm getting below error message. I'm sure some modules are missing but not sure what it is.

Can some one help me please?

[root@cmcccc httpd]# service httpd start
Starting httpd: Syntax error on line 2 of /etc/httpd/conf.d/gitweb.conf:
Invalid command '$projectroot', perhaps misspelled or defined by a module not included in the server configuration

Below is my gitweb.conf

# path to git projects (<project>.git)
$projectroot = "/apps/opt/gitrepo";

# directory to use for temp files
$git_temp = "/tmp";

# target of the home link on top of all pages
#$home_link = $my_uri || "/";

# html text to include at home page
$home_text = "indextext.html";

# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;

# stylesheet to use
$stylesheet = "/gitweb/gitweb.css";

# logo to use
$logo = "/gitweb/git-logo.png";

# the 'favicon'
$favicon = "/gitweb/git-favicon.png";

$feature{'snapshot'}{'default'} = ['zip','tgz'];
baluchen
  • 675
  • 2
  • 10
  • 17

2 Answers2

0

Make sure to use a Perl syntax, similar to my gitweb.conf.
Here, the declaration of variables should be prefixes with "our", to declare package, global variable)

our $home_link_str = "ITSVC projects";
our $site_name = "ITSVC Gitweb";
Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
0

The configuration for gitweb on apache should be something like

Alias /gitweb /var/www/gitweb
<Location /gitweb>
SetEnv GITWEB_PROJECTROOT /var/git
</Location>
<Directory /var/www/gitweb>
   Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
    AllowOverride All
    order allow,deny
    Allow from all
    AddHandler cgi-script cgi
    DirectoryIndex gitweb.cgi
</Directory>

In your case the value of GITWEB_PROJECTROOT is /apps/opt/gitrepo as indicated in your config.

Efox
  • 617
  • 2
  • 7
  • 18