# gitweb, How to script alias to a directory? for cloning over http

1 messages from 2013-08-07 to 2013-08-07. Participants: Tyrone Lucero.
Thread: https://gitlist.dev/t/34636

## Tyrone Lucero, 2013-08-07 23:11

Subject: gitweb, How to script alias to a directory? for cloning over http
Message-ID: <CAOxYNk+R97KQc0G-=_KPT==gmpKn=Yv9Awpzfq29kx=A7Zv+Rw@mail.gmail.com>
URL: https://gitlist.dev/e/CAOxYNk%2BR97KQc0G-%3D_KPT%3D%3DgmpKn%3DYv9Awpzfq29kx%3DA7Zv%2BRw%40mail.gmail.com

```
Hello, I need some guide that can  explain me the following:

I wish to know the correct rule to make work cloning over http with my
configuration, without taking all the web server to server only as
github

I setup  gitweb to it can show in a directory
by example, localhost/gitweb or 192.168.1.20/gitweb ; and works fine,
including rewrite rule



Config file under conf.d from apache config files:


Alias /gitweb /usr/share/gitweb

SetEnv GITWEB_CONFIG /etc/gitweb.conf
SetEnv GIT_PROJECT_ROOT /var/git
SetEnv GIT_HTTP_EXPORT_ALL

<Directory /usr/share/gitweb>
  Options ExecCGI FollowSymLinks Indexes
  AddHandler cgi-script .cgi
  Allow from all
  Order allow,deny
  DirectoryIndex index.cgi
  # Pretty gitweb URLs need rewrite engine on an enabled
  RewriteEngine on
  # rule condition indicates get filenames
  RewriteCond %{REQUEST_FILENAME} !-f
  # rule condition indicates get listing directories
  RewriteCond %{REQUEST_FILENAME} !-d
  # rule condition to show pretty short urls
  RewriteRule ^.* /gitweb/gitweb.cgi/$0 [L,PT]
</Directory>

--
Fénix

```
