Difference between revisions of "Setting up CGI (nginx)"

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search
(Created page with "On the sandbox/sandbot we have an nginx webserver. To enable a cgi-bin, apt install fcgiwrap")
 
Line 4: Line 4:
  
 
   apt install fcgiwrap
 
   apt install fcgiwrap
 +
 +
Then in the nginx settings...
 +
 +
    # cgi
 +
    location /cgi-bin/ {
 +
        gzip off;
 +
        root /usr/lib;
 +
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
 +
        include /etc/nginx/fastcgi_params;
 +
        fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
 +
    }
 +
 +
 +
[[Category:Sandbox]]

Revision as of 18:10, 6 February 2021

On the sandbox/sandbot we have an nginx webserver.

To enable a cgi-bin,

 apt install fcgiwrap

Then in the nginx settings...

   # cgi
   location /cgi-bin/ {
       gzip off;
       root /usr/lib;
       fastcgi_pass unix:/var/run/fcgiwrap.socket;
       include /etc/nginx/fastcgi_params;
       fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
   }