# newbie problem - gitweb and git over http

2 messages from 2010-09-02 to 2010-09-02. Participants: J. Bakshi.
Thread: https://gitlist.dev/t/24946

## J. Bakshi, 2010-09-02 05:32

Subject: newbie problem - gitweb and git over http
Message-ID: <20100902110242.2da0c81d@debian>
URL: https://gitlist.dev/e/20100902110242.2da0c81d%40debian

```
Hello,

I am a newbie in git technology, please bear with me. I am interested to implement git over http along with  gitweb.

At first I have already created a demo git repository in the server

ˋˋˋˋˋˋˋˋˋˋˋˋ``
$ cd (project-directory)
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`

Then I have set gitweb in apache

ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ
 Alias /gitweb  /var/gitdir/
RewriteEngine On
RewriteRule ^gitweb$ gitweb/ [R]
SetEnv GITWEB_CONFIG /etc/gitweb.conf

<Directory "/var/gitdir/">
AllowOverride AuthConfig
Options +ExecCGI +Indexes
Order allow,deny
Allow from all
DirectoryIndex gitweb.cgi
SetEnv GITWEB_CONFIG "/etc/gitweb.conf"
AddHandler cgi-script .cgi
</Directory>
ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ``

After restating apache I can see gitweb at http://192.168.1.1/gitweb ; but clicking on the demo project, which I have created;  just gives an error as

ˋˋˋˋˋˋˋˋˋˋˋˋ``
The requested URL /index.php was not found on this server
ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`

webdav is already running in this server for some other project. I have setup webdav for git like

ˋˋˋˋˋˋˋˋˋ
<IfModule mod_dav_svn.c>
<Location /myproject.git>
Dav on
AuthType Basic
AuthName "My repo with git"
AuthUserFile /home/svn/PASSWORD
<Limitexcept GET HEAD PROPFIND OPTIONS REPORT>
Require valid-user
</Limitexcept>
</Location>
</IfModule>
ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ

Now testing with cadaver

ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ``
cadaver https://192.168.1.1/gitweb/test.git

Authentication required for Write access requires a password on server `192.168.1.1':
Username: svnadmin
Password:
Could not open collection:
404 Not Found

ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`

I think for both the cases there are some configuration problem which can't find the correct location/path. Could anyone kindly enlighten me, actually where the problem is ?

Thanks for your time

```

## J. Bakshi, 2010-09-02 05:43

Subject: Re: newbie problem - gitweb and git over http
Message-ID: <201009020543.o825hfUm005721@dcnode-02.unlimitedmail.net>
URL: https://gitlist.dev/e/201009020543.o825hfUm005721%40dcnode-02.unlimitedmail.net
In-Reply-To: <20100902110242.2da0c81d@debian>

```
On Thu, 2 Sep 2010 11:02:42 +0530
"J. Bakshi" <joydeep@infoservices.in> wrote:

<snip>

> 
> ˋˋˋˋˋˋˋˋˋˋˋˋ``
> The requested URL /index.php was not found on this server

</snip>

gitweb related issue is solved. At /etc/gitweb.conf the following was creating the problem

ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`
$feature{'pathinfo'}{'default'} = [1];
ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ

commenting it has solved the gitweb issue.   But no success with webda  :-(
 
> ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`
> 
> webdav is already running in this server for some other project. I have setup webdav for git like
> 
> ˋˋˋˋˋˋˋˋˋ
> <IfModule mod_dav_svn.c>
> <Location /myproject.git>
> Dav on
> AuthType Basic
> AuthName "My repo with git"
> AuthUserFile /home/svn/PASSWORD
> <Limitexcept GET HEAD PROPFIND OPTIONS REPORT>
> Require valid-user
> </Limitexcept>
> </Location>
> </IfModule>
> ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ
> 
> Now testing with cadaver
> 
> ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ``
> cadaver https://192.168.1.1/gitweb/test.git
> 
> Authentication required for Write access requires a password on server `192.168.1.1':
> Username: svnadmin
> Password:
> Could not open collection:
> 404 Not Found
> 
> ˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋˋ`
> 
> I think for both the cases there are some configuration problem which can't find the correct location/path. Could anyone kindly enlighten me, actually where the problem is ?
> 
> Thanks for your time

```
