suexec
How to use suexec
- A CGI script may be anywhere in public_html hierarchy.
Every script must named something that ends in .cgi, and
the permissions on every script must be 755. Scripts will not run
without permissions of 755.You can change permissions in unix with the command:
chmod 755 <scriptname>
- The URL to run a script is simply the path to the script. For
example, if the file
public_html/adir/ascript.cgi
is a CGI script, the URL to run it would be:
http://www-pub.cise.ufl.edu/~foo/adir/ascript.cgi
where foo is your username.
- CGI scripts must emit the appropriate header(s). One of the most
common bugs is to forget the
Content-type: text/html header (or whatever type is appropriate). Scripts that do not
sent this header will cause an Internal Server Error, as the
server has no idea what it's to send. Also, remember a blank
line after your headers. Better yet, use the CGI perl module,
which takes care of most of this for you.
- Once you're sure your script is secure, and that it isn't going
to leave around CPU-eating children, you can refer to it directly
through www.cise.ufl.edu rather than www-pub.cise.ufl.edu. Keep
in mind that you have no direct shell access to www.cise.ufl.edu,
so you may wish to keep it on www-pub permanently.