Go to file
Romain de Laage 7f5330ba7c Initial commit 2020-12-15 11:18:07 +01:00
cgi Initial commit 2020-12-15 11:18:07 +01:00
static Initial commit 2020-12-15 11:18:07 +01:00
uploads Initial commit 2020-12-15 11:18:07 +01:00
README.md Initial commit 2020-12-15 11:18:07 +01:00

README.md

Upload file with webbrowser using python CGI

NGINX :

server {
    listen   80;
    server_name  example.com;

    location / {
        root <your folder>/static;
        autoindex on;
        index index.html;
    }

    location ~ ^/cgi {
        root <your folder>/cgi;
        rewrite ^/cgi/(.*) /$1 break;

        include fastcgi_params;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_param SCRIPT_FILENAME <your folder>/cgi$fastcgi_script_name;
    }
}