1 Star 0 Fork 0

Git工具集 / gitlist

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
INSTALL.md 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
KayCreations 提交于 2014-01-16 00:05 . Better nginx config

GitList Installation

  • Download GitList from gitlist.org and decompress to your /var/www/gitlist folder, or anywhere else you want to place GitList.
  • Rename the config.ini-example file to config.ini.
  • 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).
  • Create the cache folder and give read/write permissions to your web server user:
cd /var/www/gitlist
mkdir cache
chmod 777 cache

That's it, installation complete!

Webserver configuration

Apache is the "default" webserver for GitList. You will find the configuration inside the .htaccess file. However, nginx and lighttpd are also supported.

nginx server.conf

server {
    server_name MYSERVER;
    access_log /var/log/nginx/MYSERVER.access.log combined;
    error_log /var/log/nginx/MYSERVER.error.log error;

    root /var/www/DIR;
    index index.php;

#   auth_basic "Restricted";
#   auth_basic_user_file .htpasswd;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location ~* ^/index.php.*$ {
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        # if you're using php5-fpm via tcp
        fastcgi_pass 127.0.0.1:9000;

        # if you're using php5-fpm via socket
        #fastcgi_pass unix:/var/run/php5-fpm.sock;

        include /etc/nginx/fastcgi_params;
    }

    location / {
        try_files $uri @gitlist;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    add_header Vary "Accept-Encoding";
        expires max;
        try_files $uri @gitlist;
        tcp_nodelay off;
        tcp_nopush on;
    }

#   location ~* \.(git|svn|patch|htaccess|log|route|plist|inc|json|pl|po|sh|ini|sample|kdev4)$ {
#       deny all;
#   }

    location @gitlist {
        rewrite ^/.*$ /index.php;
    }
}

lighttpd

# GitList is located in /var/www/gitlist
server.document-root        = "/var/www"

url.rewrite-once = (
    "^/gitlist/web/.+" => "$0",
    "^/gitlist/favicon\.ico$" => "$0",
    "^/gitlist(/[^\?]*)(\?.*)?" => "/gitlist/index.php$1$2"
)

hiawatha

UrlToolkit {
    ToolkitID = gitlist
    RequestURI isfile Return
    # If you have example.com/gitlist/ ; Otherwise remove "/gitlist" below
    Match ^/gitlist/.* Rewrite /gitlist/index.php
    Match ^/gitlist/.*\.ini DenyAccess
}
PHP
1
https://gitee.com/vcs-all-in-one/gitlist.git
git@gitee.com:vcs-all-in-one/gitlist.git
vcs-all-in-one
gitlist
gitlist
master

搜索帮助