Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I keep running into an issue with suexec where it says the cgi script is not in the docroot.

I get this error:

"[2012-05-21 04:53:02]: command not in docroot (/apps/dctools/www/cgi-bin/test.cgi)"

I have a symbolic link to where the cgi files are. Are symlinks a problem with suexec?

Using virtual host config.

apache docroot:  /var/www/html
suexec docroot: /var/www

virtual host config

     DocumentRoot /var/www/html/dctools
     ErrorLog logs/
     CustomLog logs/ common
     SuexecUserGroup me white
     ScriptAlias /cgi-bin/ "/var/www/cgi-bin/dctools/"
     <Directory "/var/www/dctools/cgi-bin">
       AllowOverride None
       Options None
       Options FollowSymlinks
       Order allow,deny
       Allow from all

symlink setup

-sh-3.2$ pwd

-sh-3.2$ ls -l
lrwxrwxrwx 1 root root 17 May 14 21:06 dctools -> /apps/dctools/www

-sh-3.2$ pwd

-sh-3.2$ ls -l
lrwxrwxrwx 1 root     root 21 May 14 21:47 dctools -> /apps/dctools/cgi-bin
share|improve this question

The actual location of the file, not the symlink, is what determines whether suexec will run it. That setting is compiled into suexec and to change it would require recompiling it. By default that would be at /var/www which you already mentioned is your configuration. That means that you would need to either recompile suexec to allow /app to be the accepted root for suexec or you would need to move/copy the actual files within the configured suexec root.

share|improve this answer

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.