http://www.perlmonks.org?node_id=580553


in reply to Re: where to place the .pl fro cgi script
in thread where to place the .pl fro cgi script

I've managed/supported quite a few servers over the years (dating back to Netscape Server 2, and AOL's NaviServer), and for this sort of question, it's best not to assume anything about their server configuration.

The system may have all items ending in '.cgi' mapped to mod_cgi in apache, which allows them to place the file anywhere that the webserver can see it, provided it has the correct extension and permissions.

If they're using CGIwrap (which I suggest for multi-user systems with cgi access), then the cgi-bin directory should not be in public_html, as it may allow folks to read your scripts if you don't have the permissions set correctly. (and in this case, set correctly is not 0755, it's 0500).

I would assume that whatever server is either using virtual hosts, or is not multi-use, based on the URL that was given, but know that there are many, many different configurations for such things, and so not to guess the directories. (eg, MacOS X places CGIs in /Library/Webserver/CGI-Executables, even though it maps to http://host/cgi-bin/

...

So, my suggestion would be -- if you're using an ISP or hosting service -- contact them. They're the only ones who would know the configuration of their system. If you're hosting your own system, we'll need more information -- is it a default install? If so, what OS?