[Tutor] .cgi or .py for Python CGIs

Lance E Sloan lsloan@umich.edu
Wed, 12 Dec 2001 07:49:33 -0500

Frank Peavy wrote:
> I have seen references to various CGI scripts and some have the .cgi 
> extension and some have a .py extension. Which is correct? Is there a 
> preferred method?

As others have said, it usually depends on the webserver.  Here at
U-Michigan, we prefer to use no extension at all.  We use only Apache
servers on Sun Solaris machines and we don't allow average users to
write their own CGIs.  (Well, they can write them, but we won't run
them.)  For each "site" we create, they have their own cgi-bin and
cgi-ssl directories and the server is configured to run anything in
those directories.

Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"