Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

setting up perl cgi in apache

by theju112 (Initiate)
on Nov 13, 2011 at 08:32 UTC ( [id://937807]=perlquestion: print w/replies, xml ) Need Help??

theju112 has asked for the wisdom of the Perl Monks concerning the following question:

dear guys i have to prepare urgently for a lab exam. i want to store and run perl scripts from the following directory: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. i have already installed active perl.but the problem is that the script is being displayed like html content.i have already tried including the options +ExecCGI. but no use. can somebody please modify the file below so that i can run .pl files stored in htpdocs directory in a browser ?

ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2" Listen 80 LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule cgi_module modules/mod_cgi.so LoadModule dir_module modules/mod_dir.so LoadModule env_module modules/mod_env.so LoadModule include_module modules/mod_include.so LoadModule isapi_module modules/mod_isapi.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule setenvif_module modules/mod_setenvif.so <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> User daemon Group daemon </IfModule> </IfModule> ServerAdmin thejwal.pavithran@gmail.com DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/ht +docs" <Directory /> Options FollowSymLinks ExecCGI options +ExecCGI AllowOverride None Order deny,allow Deny from all </Directory> <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdo +cs"> Options Indexes FollowSymLinks Options +ExecCGI Order allow,deny Allow from all Options ExecCGI </Directory> <IfModule dir_module> Options ExecCGI DirectoryIndex index121.html </IfModule> <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> ErrorLog "logs/error.log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\ +"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\ +" %I %O" combinedio </IfModule> CustomLog "logs/access.log" common </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apa +che2.2/cgi-bin/" </IfModule> <IfModule cgid_module> </IfModule> <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi- +bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all options +ExecCGI </Directory> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule>

Replies are listed 'Best First'.
Re: setting up perl cgi in apache
by ww (Archbishop) on Nov 13, 2011 at 11:20 UTC
    Sorry; your "urgently" (aka 'lack of prep?') is not my emergency.

    More important, your request is easily enough answered by hundreds of Apache-related resources on the net.

    Update: fixed: "net" rather than "next." TY, marto.

Re: setting up perl cgi in apache
by Anonymous Monk on Nov 13, 2011 at 11:42 UTC
    Can't see the addhandler directive anywhere in the above.
Re: setting up perl cgi in apache
by remiah (Hermit) on Nov 14, 2011 at 00:36 UTC
Re: setting up perl cgi in apache
by DrHyde (Prior) on Nov 14, 2011 at 11:17 UTC
    My grandmother used to tell me "more haste, less speed". And she was right. I - and my grandmother - therefore recommend not preparing urgently.
Re: setting up perl cgi in apache
by sundialsvc4 (Abbot) on Nov 15, 2011 at 12:08 UTC

    At the risk of stating the very obvious, this is what “lab exams” are for.   For you to figure out the solution for yourself.   For you to learn what resources are already available on the net and where to find them.   (Hint:   this isn’t the place.)   And for you to learn how to manage your time so that you are not racing around like a proverbial headless chicken at the proverbial eleventh hour.   Yes, sometimes a test teaches you most when you fail one.   Experience is the best teacher, but she teaches at the school of hard knocks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://937807]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found