1# GitList Installation 2* Download GitList from [gitlist.org](http://gitlist.org/) and decompress to your `/var/www/gitlist` folder, or anywhere else you want to place GitList. 3* Rename the `config.ini-example` file to `config.ini`. 4* Open up the `config.ini` and configure your installation. You'll have to provide where your repositories are located and the base GitList URL (in our case, http://localhost/gitlist). 5* Create the cache folder and give read/write permissions to your web server user: 6 7``` 8cd /var/www/gitlist 9mkdir cache 10chmod 777 cache 11``` 12 13That's it, installation complete! 14 15## Webserver configuration 16Apache is the "default" webserver for GitList. You will find the configuration inside the `.htaccess` file. However, nginx and lighttpd are also supported. 17 18### nginx server.conf 19 20``` 21server { 22 server_name MYSERVER; 23 access_log /var/log/nginx/MYSERVER.access.log combined; 24 error_log /var/log/nginx/MYSERVER.error.log error; 25 26 root /var/www/DIR; 27 index index.php; 28 29# auth_basic "Restricted"; 30# auth_basic_user_file .htpasswd; 31 32 location = /robots.txt { 33 allow all; 34 log_not_found off; 35 access_log off; 36 } 37 38 location ~* ^/index.php.*$ { 39 fastcgi_index index.php; 40 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 41 42 # if you're using php5-fpm via tcp 43 fastcgi_pass 127.0.0.1:9000; 44 45 # if you're using php5-fpm via socket 46 #fastcgi_pass unix:/var/run/php5-fpm.sock; 47 48 include /etc/nginx/fastcgi_params; 49 } 50 51 location / { 52 try_files $uri @gitlist; 53 } 54 55 location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { 56 add_header Vary "Accept-Encoding"; 57 expires max; 58 try_files $uri @gitlist; 59 tcp_nodelay off; 60 tcp_nopush on; 61 } 62 63# location ~* \.(git|svn|patch|htaccess|log|route|plist|inc|json|pl|po|sh|ini|sample|kdev4)$ { 64# deny all; 65# } 66 67 location @gitlist { 68 rewrite ^/.*$ /index.php; 69 } 70} 71``` 72 73### lighttpd 74 75``` 76# GitList is located in /var/www/gitlist 77server.document-root = "/var/www" 78 79url.rewrite-once = ( 80 "^/gitlist/web/.+" => "$0", 81 "^/gitlist/favicon\.ico$" => "$0", 82 "^/gitlist(/[^\?]*)(\?.*)?" => "/gitlist/index.php$1$2" 83) 84``` 85 86### hiawatha 87 88``` 89UrlToolkit { 90 ToolkitID = gitlist 91 RequestURI isfile Return 92 # If you have example.com/gitlist/ ; Otherwise remove "/gitlist" below 93 Match ^/gitlist/.* Rewrite /gitlist/index.php 94 Match ^/gitlist/.*\.ini DenyAccess 95} 96``` 97