Build Gitweb server with Ubuntu Nginx

Source: Internet
Author: User

Install Nginx and Gitweb simba @ simba-laptop on the Gitweb server in Ubuntu Nginx :~ $ Sudo apt-get install nginx gitweb modify Gitweb configuration file simba @ simba-laptop :~ /Git-repo $ vim/etc/gitweb. conf modify or add the following: [plain] # Git repository path $ projectroot = "/home/simba/git-repo "; # enable tracing $ feature {'blame'} {'default'} = [1]; $ feature {'blame'} {'override'} = 1; # enable snapshot download $ feature {'snapshot'} {'default'} = ['zip ', 'tgz']; $ feature {'snapshot'} {'override'} = 1; To help Nginx execute CGI, link the Gitweb installation directory to the simba @ simba-laptop :~ $ Sudo ln-s/usr/share/gitweb // var/www/modify Nginx configuration file... server {set $ web_root/var/www/; # set the variable web_rootlisten 80 default; server_name localhost; access_log/var/log/nginx/localhost. access. log; location/{root $ web_root; index index.html index.htm index. cgi ;}... location ~. *\. Cgi $ {gzip off; # gzip makes scripts feel slower since they have to complete before getting gzippedfastcgi_pass unix:/var/run/nginx/cgiwrap-dispatch.sock; fastcgi_index index. cgi; Response SCRIPT_FILENAME $ web_root $ response; Response QUERY_STRING $ query_string; Response REQUEST_METHOD $ request_method; Response CONTENT_TYPE $ response; Response CONTENT_LENGTH $ content_length; Response GATEWAY_INTERFACE CGI/1.1; Response SERVER_SOFTWARE nginx; response SCRIPT_NAME $ response; Response response $ response; Response DOCUMENT_URI $ document_uri; Response DOCUMENT_ROOT $ web_root; Response SERVER_PROTOCOL $ server_protocol; Response response $ response; Response REMOTE_PORT $ remote_port; Response SERVER_ADDR $ server_addr; fastcgi_param SERVER_PORT $ server_port; fastcgi_param SERVER_NAME $ server_name ;}...} restart Nginxsudo nginx-s reload

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.