If you attempt to run a Python script on a web page on an Apache web server and see only the Python code displayed, then you may need to create a
ScriptAlias
directive in Apache's http.conf
configuration file and restart the Apache webserver. If you see an
"Internal Server Error" displayed when the script is being called by
Apache on a Unix/Linux system, but the code is correct, then you may
need to assign execute permission to the file so that Apache can run
the script. You also need to be sure the script contains a line at the
beginning of the file that provides the location of Python on the system.
[ More Info ]