How can I assign all scripts in a directory to perl?


I am using Litespeed for a week now, as a replacement for apache.
I am actually trying to get TWiki working, and because TWiki uses
one directory with perl scripts without the .pl suffix I wondered
weather it is possible to assign all script in that directory to perl?

I allready assigned the CGI-Context to that directory but that only works for .pl-files.

I'm trying to find a better solution than renaming all the files to *.pl for a couple of hours now ... but nothing I tried worked ...

I hope you can help me, thank you ;-)


LiteSpeed Staff
Define a script handler for "pl" at server level using CGI handler.
In that directory, add "ForceType application/x-httpd-pl" configuration in .htaccess under that directory.
Thank you for your fast answer,

but I still can't get it working ...
I added application/x-httpd-pl to the mimetypes and
added a .htacces file in the main directory with that content:
<Directory /bin>
  ForceType application/x-httpd-pl
and because that didn't work one in the directory bin
ForceType application/x-httpd-pl
and some slightly different things ..
AllowOveride is on .... the Log doesn't show anything strange ...
I am not shure whether LSWS reads the .htacces file in the Directory /bin.
I hope you can help me.

Thanks in advance!


LiteSpeed Staff
You must add a script handler for "pl" file using the CGI handler at server level using our web admin console, it will added MIME type application/x-httpd-pl behind the scene. If you explicitly added that MIME type some where, it is not going to work.
I added the CGI handler before before in the virtual host, but the log said that the mime-type application/x-httpd-pl is not configure ...
Now I added the CGI handler at server level
and tried the two .htacces files shown above ... on in the directory itself and as this din't work one in the htdocs directory.

the main directory is showing "lscgid: execve(): Permission denied"
this error may be because i haven't configured twiki yet

and when i go into the bin directory and whant to execute the sript firefox wants to download it and says that its type is application/octet-stream

I have no idea whats the problem ...


LiteSpeed Staff
Make sure to make those scripts executable "chmod a+x *".
And you can try "ForceType application/x-httpd-cgi" as well, should have the same effect.
Its realy strange ...
I think it is a Browser related problem ...
I normaly use firefox and firefox everytime said that the file I want is a application/octet-stream,
but then I tried to open it whith IE and it worked.

*Arg* just a cache issue ...
after restarting firefox everything is fine ...
it worked with "ForceType application/x-httpd-cgi"

Thank you very much for your help!
Last edited: