http://www.tutorialspoint.com/python/python_cgi_programming.htm
#!/usr/bin/python
print "Content-type:text/html\r\n\r\n"
print '<html>'
print '<head>'
print '<title>Hello Word - First CGI Program</title>'
print '</head>'
print '<body>'
print '<h2>Hello Word! This is my first CGI program</h2>'
print '</body>'
print '</html>'
What is the significance of #!/usr/bin/python
It says to save file as hello.py
and save it to /var/www/cgi-bin
directory but I don't have this directory, should I create one?
Before running your CGI program, make sure you have change mode of file using chmod 755 hello.py UNIX command to make file executable.
but where to (how to) execute this chmod
command? should I include $chmod 755 "/location of hello(.py).../"
in hello.py
?