Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to execute py/cgi files on my server. I have changed the httpd.conf as below, but the browser says the files don't exist.

AddHandler cgi-script .cgi .py
LoadModule cgi_module modules/mod_cgi.so
ScriptAlias /cgi-bin/ "/opt/app/current/cgi-bin/"
<Directory "/opt/app/current/cgi-bin/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    Options +ExecCGI
share|improve this question

migrated from stackoverflow.com Oct 2 '12 at 6:54

This question came from our site for professional and enthusiast programmers.

Are the python files in /opt/app/current/cgi-bin/ ? Are the python files accessible and executable by the webserver user? –  korylprince Oct 1 '12 at 15:36
yes they are in there, they are chmod 777 –  Dirk Nachbar Oct 1 '12 at 15:37
Have you checked the apache logs? What does the error message say? –  korylprince Oct 1 '12 at 15:38
where do I find it? ErrorLog logs/error_log, is it under /etc/httpd? –  Dirk Nachbar Oct 1 '12 at 15:41
That depends entirely on what OS/Distribution/etc you are running it on. If you are on a *nix system, it should be in /var/log/something. Check for apache and httpd. –  korylprince Oct 1 '12 at 15:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.