gitprep / README /
Newer Older
157 lines | 3.327kb
copy gitweblite soruce code
root authored on 2012-11-23
1
Gitweb Lite
2

            
3
  gitweb.cgi clone. Serve git repository.
4
  Example: http://perlcodesample.com/gitweblite
5

            
6
Features
7

            
8
  This is gitweb.cgi clone, and has the following features.
9

            
10
  - gitweb.cgi default features.
11
  - Written by Perl and Mojolicious web framework.
12
  - Prerequisite is Perl 5.8.7+.
13
  - Having HTTP server. You can run gitweblite,
14
    even if "apache" is not installed.
15
  - Multiple project homes.
16
  - Zero configuration.
17
  - Default encoding is UTF-8, you can change this.
18
  - don't work on Windows.
19

            
20
Operation
21

            
22
  Start
23
  
24
      ./gitweblite
25
  
26
    Application start in back ground. Port is 10010.
27
    You can access the following URL.
28
      
29
      http://localhost:10010
30
    
31
    If you change port, edit gitweblite.conf.
32
  
33
  Stop
34
  
35
      ./gitweblite --stop
36
    
37
    You can stop application by --stop option.
38

            
39
Description
40

            
41
  by default, /home and /git/pub directory is searched recursively.
42
  if xxx.git directory is found and it is git repository,
43
  the repository display on top page.
44

            
45
Config
46

            
47
  You can set config in gitweblite.conf.
48
  Config is written by JSON (// is comment line).
49
  Create your config file copied from gitweblite.conf.example
50
  
51
    cp gitweblite.conf.example gitweblite.conf
52

            
53
  These is available options.
54
  
55
    encoding
56
    
57
      Text encoding.
58
      
59
      Default:
60
      
61
        "encoding" : "UTF-8"
62

            
63
    git_bin
64
    
65
      git command (/usr/local/bin/git etc)
66
      
67
      Default:
68
      
69
        git command is automatically detected by PATH environment variable
70

            
71
    hypnotoad
72
    
73
      Server configuration.
74
    
75
      Default:
76
      
77
        "hypnotoad" : {
78
          "listen" : ["http://*:10010"]
79
        }
80
    
81
    logo_link
82
    
83
      Logo link URL
84
      
85
      Default:
86
      
87
      "logo_link" : "https://github.com/yuki-kimoto/gitweblite"
88
    
89
    prevent_xss
90
    
91
      Prevent XSS atack.
92
      
93
      Default:
94
      
95
        "prevent_xss" : 0
96
    
97
    search_dirs
98
        
99
      Git repository searching directories.
100
      
101
      Default:
102
      
103
        "search_dirs" : ["/git/pub", "/home"]
104
    
105
    search_max_depth
106
    
107
      Searching directory max depth.
108
      
109
      Default:
110
      
111
        "search_max_depth" : 10
112
    
113
    text_ext
114
    
115
      Text file extention. If "encoding" is not "UTF-8", generally text file
116
      is assumed as binary file. If "text_ext" is set, the file having the extention
117
      assumed as text file.
118
    
119
      Default:
120
      
121
        "text_exts" : ["txt"]
122

            
123
Logo and favicon
124

            
125
  You can use your logo and favicon.
126
  Set logo or favicon image file into the following name.
127
  
128
    user/public/git-logo.png
129
    user/public/git-favicon.png
130

            
131
Reverse proxy
132

            
133
  You can use gitweblite with reverse proxy such as apache/mod_proxy.
134

            
135
  Apache/mod_proxy
136

            
137
    <VirtualHost *:80>
138
      ServerName perlcodesample.com
139
      <Proxy *>
140
        Order deny,allow
141
        Allow from all
142
      </Proxy>
143
      ProxyRequests Off
144
      ProxyPreserveHost On
145

            
146
      ProxyPass /gitweblite http://localhost:10010/gitweblite keepalive=On
147
      ProxyPassReverse /gitweblite http://localhost:10010/gitweblite
148

            
149
      RequestHeader set X-Forwarded-HTTPS "0"
150
    </VirtualHost>
151

            
152
COPYRIGHT & LICENSE
153

            
154
  Copyright 2009-2012 Yuki Kimoto, all rights reserved.
155

            
156
  This program is free software; you can redistribute it and/or modify it
157
  under the same terms as Perl itself.