Getting Perl.pl files to execute via Apache 1.2.6 - not just display script text?

Getting Perl.pl files to execute via Apache 1.2.6 - not just display script text?

Post by Lachlan Cranswi » Mon, 20 Jul 1998 04:00:00



A very embarressing question - how do I get Apache to pass
perl scripts to perl and not just display them to the browser
as text?

When I run from the command line, the Perl scripts works OK.

----

Script aliases is set (for www.ccp14.ac.uk virtual web server)

Alias /rib/ /usr/local/rib/
ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/ccp14/
ScriptAlias /rib/cgi-bin/ /usr/local/rib/cgi-bin/

Following is the header of one of the perl script.

#!/usr/local/bin/perl
use lib '/usr/local/rib/lib';
# NHSE Repository in a Box (RIB)
#

----

I have read up about mod_cgi and adding:
  application/x-httpd-cgi in the mime types but am just
confused why perl scripts won't handle by default.

Is it just a matter of adding into mime.types
   application/x-httpd-cgi      pl  

Or for security - is there more to it?

For initial safety - I am not using mod_perl for the moment.

Lachlan.

PS:  Not running apache 1.3.0 at the moment as under SGI O2
running IRIX 6.3 - 1.3.0 seems to be a bit flakey in not
starting up (as reported in a previous post).

-----
Lachlan M. D. Cranswick
Collaborative Computational Project No 14 (CCP14)
    for Single Crystal and Powder Diffraction
Daresbury Laboratory, Warrington, WA4 4AD U.K
Tel: +44 (0)1925-603703  Fax: +44 (0)1925-603124  Room C14

CCP14 Webpage (Under heavy construction):
                                    http://www.ccp14.ac.uk

 
 
 

Getting Perl.pl files to execute via Apache 1.2.6 - not just display script text?

Post by -bill » Tue, 28 Jul 1998 04:00:00


do you have execute bits turned on for the scripts?
do you have ScriptAlias set for that directory ?
--

-bill-



 
 
 

1. cgi scripts not getting executed, only the source code gets displayed

Hi
I'm using Apache1.3.14 on solaris.
I'm trying to allow each of my user-directories to have a cgi-bin directory.
So I placed the cgi-bin directory underneath the public_html directory. I
added the following code to my httpd.conf

AddHandler cgi-script .cgi

<Directory /home/*/public_html/cgi-bin>
Options ExecCGI
SetHandler cgi-script
</Directory>

I've saved the cgi-file under ~user/public_html/cgi-bin/<cgi-filename>

When I try running it from the browser, I see the source code, rather than
seeing the cgi script being executed.

Whats possibly wrong with the configuration?

Thanks
Akshay

2. unexplained activity on ippp0

3. Execute a sh script under perl and sh: sh script; perl script?

4. HELP : Internal WEB server on a different subnet !?!?!

5. Two perl scripts, MakeBootDisk.pl and Rescue.pl I would like to develop

6. go back to 256 requests per queue

7. sh command in text file, execute it when the file is displayed?

8. Urgent help required: Apache fails to load

9. Output from cgi scripts displaying as text not html formatted text

10. problem with Apache and mod_perl and executing .pl files.

11. Getting satan to execute the perl scripts

12. php files getting displayed as text files

13. Apache-perl: place html files and perl scripts in the same location