# Help setting up gitweb [SOLVED]

## irasnyd

I have a very standard apache server running, and I'm trying to get gitweb to work.

The cgi part works perfectly, displaying all of my git projects, but does not display the css or images which are associated with it. I have no idea why this happens.

I've confirmed that apache is reading .htaccess files in the gitweb directory, by adding "Deny from all" to it, which makes the directory completely inaccessible, as expected.

Trying to access the css and image files directory gives a 500 error: "Internal server error"

Here is my /var/www/localhost/htdocs/gitweb directory:

```
drwxr-xr-x  2 apache apache    304 Jan  8 21:46 .

drwxr-xr-x 11 apache apache    472 Jan  8 21:14 ..

-rw-r--r--  2 root   root       74 Jan  8 21:44 .htaccess

-rw-------  1 root   root      310 Jan  8 19:26 .webapp

-rw-------  1 root   root      555 Jan  8 19:26 .webapp-gitweb-1.4.4.2

-rw-r--r--  2 apache apache    164 Jan  8 19:26 git-favicon.png

-rw-r--r--  2 apache apache    208 Jan  8 19:26 git-logo.png

-rwxr-xr-x  2 apache apache 122315 Jan  8 19:34 gitweb.cgi

-rw-r--r--  2 apache apache   6355 Jan  8 19:26 gitweb.css

```

And here is my .htaccess file: (the gentoo-installed default)

```
Options +ExecCGI -Indexes

SetHandler cgi-script

DirectoryIndex gitweb.cgi

```

Any thoughts as to why the css and images are not loading, but the gitweb.cgi file is working fine?

EDIT: SOLVED

I've solved the problem. It turns out that the gentoo-provided .htaccess file is buggy. It tries to make every file in the directory an executable cgi script, which is wrong. Only the gitweb.cgi file needs to be made a cgi script.

I have therefore changed the .htaccess file to the following:

```
Options +ExecCGI -Indexes

<Files gitweb.cgi>

    SetHandler cgi-script

</Files>

DirectoryIndex gitweb.cgi

```

----------

