apt install fcgiwrap- into an
/etc/nginx/conf.d/somesite.conf
location /scripts
{
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
}- assuming the site document root is
/var/www/html, create a folder/var/www/html/scriptswith the follow file
/var/www/html/scripts/hello.sh
#!/bin/bash
echo 'Content-Type: text/plain'
echo ''
echo 'Hello, world!'-
restart nginx
service nginx restart -
access to
https://name.somesite/scripts/hello.sh