Skip to content

Instantly share code, notes, and snippets.

@shimarin
Created January 31, 2018 09:14
Show Gist options
  • Save shimarin/b86b82ff8ce43ac0fb589bf3e7418ada to your computer and use it in GitHub Desktop.
Save shimarin/b86b82ff8ce43ac0fb589bf3e7418ada to your computer and use it in GitHub Desktop.
nginxでCGI
location ~ [^/]\.cgi(/|$) {
fastcgi_split_path_info ^(.+\.cgi)(/.+)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_pass unix:/run/fcgiwrap-nginx.socket-1;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
FCGI_SOCKET=/run/fcgiwrap-nginx.socket
FCGI_PORT=
FCGI_PROGRAM=/usr/sbin/fcgiwrap
FCGI_USER=nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment