New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/nginx: fix gitweb submodule #38527
Conversation
}; | ||
|
||
services.nginx = { | ||
virtualHosts.default = { | ||
locations."/gitweb" = { | ||
root = "${pkgs.git}/share/gitweb"; | ||
locations."/gitweb/" = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you also add a redirect from /gitweb
to /gitweb/
?
extraConfig = '' | ||
include ${pkgs.nginx}/conf/fastcgi_params; | ||
fastcgi_param GITWEB_CONFIG ${cfg.gitwebConfigFile}; | ||
fastcgi_pass unix:/run/gitweb.sock; | ||
fastcgi_pass unix:/run/gitweb/gitweb.sock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand this change, so gitweb was trying to create its own socket?
Also, the previous socket was owned by nginx, and this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wmertens Before this PR systemd does socket magic, after this PR gitweb does it itself (I didn't know its able to do that - its not part of gitweb docs but part of CGI::Fast
library docs which gitweb uses for fastcgi mode).
Socket is still owned by nginx, since gitweb is run under nginx user. And with RuntimeDirectory
systemd creates /run/gitweb
folder with nginx owner, so gitweb is allowed to write socket there.
👍 Good stuff! |
@wmertens Thank you! |
Motivation for this change
Correct issues
CGI::Fast
used by gitweb can create socket by its ownFCGI::ProcManager
, otherwise gitweb will stop functioning under burst loads in case of error conditionscc @wmertens
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)