mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Update sample configuration for Smart HTTP
Using uWSGI for the Smart HTTP protocol caused some issues, see e.g. FS#45428. Suggest using fcgiwrap instead which is more lightweight, has better documentation and is easier to debug. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
552a297a49
commit
c89bf51af2
3 changed files with 32 additions and 17 deletions
27
INSTALL
27
INSTALL
|
@ -63,24 +63,17 @@ Setup on Arch Linux
|
||||||
AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
|
AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
|
||||||
AuthorizedKeysCommandUser aur
|
AuthorizedKeysCommandUser aur
|
||||||
|
|
||||||
9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
|
9) If you want to enable smart HTTP support with nginx and fcgiwrap, you can
|
||||||
the following directives:
|
use the following directives:
|
||||||
|
|
||||||
location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" {
|
location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" {
|
||||||
include uwsgi_params;
|
fastcgi_pass unix:/run/fcgiwrap.sock;
|
||||||
uwsgi_modifier1 9;
|
include fastcgi_params;
|
||||||
uwsgi_param PATH_INFO /aur.git/$2;
|
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
|
||||||
uwsgi_param GIT_NAMESPACE $1;
|
fastcgi_param PATH_INFO /aur.git/$3;
|
||||||
uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
|
fastcgi_param GIT_HTTP_EXPORT_ALL "";
|
||||||
|
fastcgi_param GIT_NAMESPACE $1;
|
||||||
|
fastcgi_param GIT_PROJECT_ROOT /srv/http/aurweb/;
|
||||||
}
|
}
|
||||||
|
|
||||||
For the uWSGI configuration, the following template can be used:
|
Sample systemd unit files for fcgiwrap can be found under conf/.
|
||||||
|
|
||||||
[uwsgi]
|
|
||||||
plugins = cgi
|
|
||||||
uid = aur
|
|
||||||
processes = 1
|
|
||||||
threads = 8
|
|
||||||
env = GIT_HTTP_EXPORT_ALL=
|
|
||||||
env = GIT_PROJECT_ROOT=/srv/http/aurweb
|
|
||||||
cgi = /usr/lib/git-core/git-http-backend
|
|
||||||
|
|
11
conf/fcgiwrap.service.proto
Normal file
11
conf/fcgiwrap.service.proto
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Simple CGI Server
|
||||||
|
After=nss-user-lookup.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/fcgiwrap
|
||||||
|
User=aur
|
||||||
|
Group=aur
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Also=fcgiwrap.socket
|
11
conf/fcgiwrap.socket.proto
Normal file
11
conf/fcgiwrap.socket.proto
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=fcgiwrap Socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/fcgiwrap.sock
|
||||||
|
SocketUser=http
|
||||||
|
SocketGroup=http
|
||||||
|
SocketMode=0700
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
Loading…
Add table
Reference in a new issue