Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute perl scripts outside cgi-bin 1

Status
Not open for further replies.

fortytwo

Technical User
Apr 18, 2000
206
GB
I have a couple of sites that I want to run mainly perl scripts, but also a very few plain .html files. I currently have a ScriptAlias set up so .pl scripts will execute within the cgi-bin directory, but as so many of the pages of the sites are perl I would like perl scripts to be executed whereever they are, eg:


I have seen this done on but have been unable to work out how this works. Can anyone give me any pointers to getting this working? I could just make .pl files execute as .cgi files I guess but is there a more elegant solution?

Thanks
Will.
fortytwo
will@hellacool.co.uk
 
Add these lines to your httpd.conf
Code:
AddHandler cgi-script .cgi .pl
and in the Directory configuration for your htdocs directory
Code:
Options ... ExecCGI
Just add ExecCGI to the current line. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top