You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Fisher GM <jo...@gmail.com> on 2015/07/20 03:01:04 UTC

[users@httpd] ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

A second question...

Again, running Apache 2.2 with Debian 7. Trying to simplify all the 
vhost config files.

In the sites-available files, there is the following code:

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

Same question, is this necessary? Can I delete it?

Most of our older sites are simple. Some go back to 1995 with hand-coded 
html. I gather this is for perl only.

On one of our older sites, it has perhaps ten simple html pages. But we 
are running an old perl script (Accesswatch). I can't seem to access 
mysite.com/cgi-bin/ -- in the old days I seem to remember one could do that.

So if I remove this code, would my perl script die, or would everything 
explode?

Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

Posted by Kurtis Rader <kr...@skepticism.us>.
On Sun, Jul 19, 2015 at 6:44 PM, John Fisher GM <jo...@gmail.com>
wrote:

> I looked at cgi-bin. There are two files, php and php5, each 8 MB in size.
> That seems a bit odd. But in this small site, we're not using php, so we're
> OK.
>

Based on the size it is reasonable to conclude those are executables of the
PHP language. If you run "which php" at a shell prompt it will probably
tell you the main PHP executable is someplace like /usr/bin/php. The only
thing odd is that someone put a copy of those executables in that
directory. Especially since you imply your site only uses the Perl language.


> I realized the script we are running is not invoked by apache. It's run by
> chron and that invokes the .pl file (it's a log file aggregator). So
> although I removed the ScriptAlias, the script still runs.
>

A program run by the cron(1) scheduler (try typing "man cron" at a shell
prompt) will only depend on the ScriptAlias directive you removed if the
program makes HTTP requests to your web server. And even then only if it
requests URIs in that cgi-bin directory. Otherwise, as your found out, the
script will continue to run despite changing the Apache web server
configuration.


> I have a few more questions, but they are more complex, so I'll wait till
> later to pose them. Thanks for your help so far.
>

Please don't take this the wrong way but you are clearly in over your head.
Your company needs to hire a consultant to help you with these issues. It's
only because your questions up to this point have had fairly obvious
answers and didn't require actual knowledge of your web server environment
that we could help.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

Re: [users@httpd] ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

Posted by John Fisher GM <jo...@gmail.com>.
Again, thank you.

I looked at cgi-bin. There are two files, php and php5, each 8 MB in 
size. That seems a bit odd. But in this small site, we're not using php, 
so we're OK.

I realized the script we are running is not invoked by apache. It's run 
by chron and that invokes the .pl file (it's a log file aggregator). So 
although I removed the ScriptAlias, the script still runs.

I have a few more questions, but they are more complex, so I'll wait 
till later to pose them. Thanks for your help so far.


On 07/19/2015 09:16 PM, Yehuda Katz wrote:
> This is only useful if you have scripts in /usr/lib/cgi-bin that you 
> actually use.
> Look in that directory and see if anything there looks familiar. If 
> not, you can remove that safely too.
>
> - Y
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

Posted by Yehuda Katz <ye...@ymkatz.net>.
This is only useful if you have scripts in /usr/lib/cgi-bin that you
actually use.
Look in that directory and see if anything there looks familiar. If not,
you can remove that safely too.

- Y

On Sun, Jul 19, 2015 at 9:01 PM, John Fisher GM <jo...@gmail.com>
wrote:

> A second question...
>
> Again, running Apache 2.2 with Debian 7. Trying to simplify all the vhost
> config files.
>
> In the sites-available files, there is the following code:
>
>      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>>
>>     <Directory "/usr/lib/cgi-bin">
>>         AllowOverride None
>>         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>>         Order allow,deny
>>         Allow from all
>>     </Directory>
>>
>
> Same question, is this necessary? Can I delete it?
>
> Most of our older sites are simple. Some go back to 1995 with hand-coded
> html. I gather this is for perl only.
>
> On one of our older sites, it has perhaps ten simple html pages. But we
> are running an old perl script (Accesswatch). I can't seem to access
> mysite.com/cgi-bin/ -- in the old days I seem to remember one could do
> that.
>
> So if I remove this code, would my perl script die, or would everything
> explode?
>
> Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>