[Solved] Trying to understand installing a CGI script [duplicate]


You have to include the #!/usr/bin/python line on *nix systems to tell the shell how to interpret this script and where your interpreter is in the system. This is called the shebang line.

The chmod 755 hello.py command is a unix shell command to change the permissionson of the file and make it executable. Doing this you can run the script without having to do python hello.py but instead ./hello.py .

From my understanding you are a windows user. In this case, you don’t have to do all of this. Just save the file as hello.py and that’s it.

This post on tutorialspoint.com implies that you already have an HTTP server running that supports cgi and has a default web directory of /var/www/

1

solved Trying to understand installing a CGI script [duplicate]