Run/Execute python file on Apache2 with local server, ubuntu14.04LTS


 I tried to run my python3 scripts on my local server with apache2 and ubuntu14.04LTS. I had permission problems and addressed it.


My firefox shows

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

Apache/2.4.7 (Ubuntu) Server at localhost Port 80
also, in log file (/var/log/apache2/error.log), it says "Permission denied".

[Sun Jun 05 14:33:58.930599 2016] [core:notice] [pid 18049] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 05 14:34:02.586809 2016] [cgi:error] [pid 18052] [client] AH01215: (13)Permission denied: exec of '/var/www/html/cgi-bin/' failed
[Sun Jun 05 14:34:02.588022 2016] [cgi:error] [pid 18052] [client] End of script output before headers:


Allow people to execute file.
sudo chmod 755 filename