Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

index.cgi and its parent directory are mode 755 owned by the same owner, the DocumentRoot of the site below. The site-enabled/005-icons file has:

<VirtualHost *:80>

    DocumentRoot /home/jonathan/ikon
    <Directory />
        Options FollowSymLinks
        AllowOverride None

    <Directory /home/jonathan/ikon>
        Options ExecCGI Indexes FollowSymLinks MultiViews
        AllowOverride All
        AddHandler cgi-script .cgi
        DirectoryIndex index.cgi index.html
        Order allow,deny
        allow from all

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


There is nothing in the error logs when I attempt to access them from the web; when I tried to run index.cgi from the command line it ran predictably well.

I believe that /index.cgi may not be running as a side effect of something preventing /*.cgi from running. I tried to run the index script as /, then as /index.cgi, and then copied it to /icon.cgi which behaved identically to when it was invoked as / or /index.cgi.



I went through the level 1 technical support questions before posting: for tech support, "Is it plugged in? Is it turned on?" I've checked the logs and confirmed that the program runs as expected when executed from the command line, and also checked permissions, etc. I was really hoping for level 2 or level 3 kind of support, not "Check your logfiles; maybe you have a syntax error." I already stated in the original question that I checked the logfiles and nothing's there when it serves up a 500.

share|improve this question

A 500 error in this context often means your CGI script crashed. Check the various log files for clues, look for syntax errors, etc.

share|improve this answer
Ok, my script runs from the command line, the log files have no clues, as stated in the question. – Jonathan Hayward Aug 4 '12 at 21:40
I have seen vaguely similar behavior when a CGI script was in a world-writeable directory, and suexec vetoed running the script, generating an error with nothing in the logs. That's not the case here (I checked, just like checking if my script runs without crashing and looked at the log files), but is there anything else that could be causing it? I think this error has a higher paygrade than 'It's crashing because you misplaced a punctuation character.' (A misplaced punctuation character leaves an easily diagnosed trace in the logs.) – Jonathan Hayward Aug 4 '12 at 21:43

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.