Skip to content

Instantly share code, notes, and snippets.

@r10r
Created November 7, 2014 16:29
Show Gist options
  • Save r10r/1a5fb25967da9b00c889 to your computer and use it in GitHub Desktop.
Save r10r/1a5fb25967da9b00c889 to your computer and use it in GitHub Desktop.
uwsgi/nginx simple CGI example
[uwsgi]
plugins = cgi
socket = /tmp/uwsgi.sock
cgi = /cgi-bin=/tmp/cgi
cgi-allowed-ext = .sh
server {
listen 80;
# uwsgi testing
location /cgi-bin/ {
include uwsgi_params;
uwsgi_modifier1 9;
uwsgi_pass unix://tmp/uwsgi.sock;
}
}
#!/bin/sh
cat <<EOF
Content-type: text/html
<html>
<body>
<pre>`env`</pre>
</body>
</html>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment