https://wiki.archlinux.org/index.php/Gitweb#Nginx shows to configure gitweb and fcgiwrap in /etc/nginx/nginx.conf, by adding (into http{server{...}} in /etc/nginx/nginx.conf, if I am correct):

location /gitweb.cgi {
    include fastcgi_params;
    gzip off;
    fastcgi_param   SCRIPT_FILENAME  /usr/share/gitweb/gitweb.cgi;
    fastcgi_param   GITWEB_CONFIG  /etc/gitweb.conf;
    fastcgi_pass    unix:/var/run/fcgiwrap.sock;

location / {
    root /usr/share/gitweb;
    index gitweb.cgi;

It doesn't work: http://localhost:4321/ shows "502 Bad Gateway nginx/1.14.0 (Ubuntu)". How shall I make it work?

https://gist.github.com/mcxiaoke/055af99e86f8e8d3176e#redirecting-www-to-non-www shows to configure gitweb and fcgiwrap in /etc/nginx/sites-available/ and /etc/nginx/sites-enabled/. I can get it work.

Are the above two ways equivalent?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.