Created
November 7, 2014 16:29
-
-
Save r10r/1a5fb25967da9b00c889 to your computer and use it in GitHub Desktop.
uwsgi/nginx simple CGI example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
plugins = cgi | |
socket = /tmp/uwsgi.sock | |
cgi = /cgi-bin=/tmp/cgi | |
cgi-allowed-ext = .sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
# uwsgi testing | |
location /cgi-bin/ { | |
include uwsgi_params; | |
uwsgi_modifier1 9; | |
uwsgi_pass unix://tmp/uwsgi.sock; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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