Setting up CGI (nginx): Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "On the sandbox/sandbot we have an nginx webserver. To enable a cgi-bin, apt install fcgiwrap")
 
m (Michael Murtaugh moved page Setting up cgi (nginx) to Setting up CGI (nginx))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Running [[CGI]] on [[nginx]]...
On the sandbox/sandbot we have an nginx webserver.
On the sandbox/sandbot we have an nginx webserver.


Line 4: Line 6:


   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]]

Latest revision as of 19:11, 6 February 2021

Running CGI on nginx...

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;
   }