summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-28 18:02:38 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-28 18:03:21 +0200
commitc89bf51af26003d01fb73eece3899c2b6e97e7bd (patch)
treed802488c80cfe9f2057840d0384eec5944a27f11
parent552a297a498c2fc0c1fb53bae4d4ad76a165e807 (diff)
downloadaurweb-c89bf51af26003d01fb73eece3899c2b6e97e7bd.tar.xz
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>
-rw-r--r--INSTALL27
-rw-r--r--conf/fcgiwrap.service.proto11
-rw-r--r--conf/fcgiwrap.socket.proto11
3 files changed, 32 insertions, 17 deletions
diff --git a/INSTALL b/INSTALL
index b090789..d68fa26 100644
--- a/INSTALL
+++ b/INSTALL
@@ -63,24 +63,17 @@ Setup on Arch Linux
AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
AuthorizedKeysCommandUser aur
-9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
- the following directives:
+9) If you want to enable smart HTTP support with nginx and fcgiwrap, you can
+ 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))$" {
- include uwsgi_params;
- uwsgi_modifier1 9;
- uwsgi_param PATH_INFO /aur.git/$2;
- uwsgi_param GIT_NAMESPACE $1;
- uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
+ fastcgi_pass unix:/run/fcgiwrap.sock;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
+ fastcgi_param PATH_INFO /aur.git/$3;
+ 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:
-
- [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
+ Sample systemd unit files for fcgiwrap can be found under conf/.
diff --git a/conf/fcgiwrap.service.proto b/conf/fcgiwrap.service.proto
new file mode 100644
index 0000000..c4e8544
--- /dev/null
+++ b/conf/fcgiwrap.service.proto
@@ -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
diff --git a/conf/fcgiwrap.socket.proto b/conf/fcgiwrap.socket.proto
new file mode 100644
index 0000000..a1bc826
--- /dev/null
+++ b/conf/fcgiwrap.socket.proto
@@ -0,0 +1,11 @@
+[Unit]
+Description=fcgiwrap Socket
+
+[Socket]
+ListenStream=/run/fcgiwrap.sock
+SocketUser=http
+SocketGroup=http
+SocketMode=0700
+
+[Install]
+WantedBy=sockets.target