Getting Perl to run on all pages..

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Getting Perl to run on all pages..

Postby randor » 07. September 2012 17:50

I am setting up using Ubuntu and Xampp 1.8.0 I have setup a virtual host and perl is working in the cgi-bin, but I would like to be able to use perl anywhere in the htdocs file, can someone tell me how this would be done?

Thank you
randor
 
Posts: 13
Joined: 07. September 2012 17:45
XAMPP Version: 5.6.3
Operating System: Ubuntu

Re: Getting Perl to run on all pages..

Postby JonB » 07. September 2012 21:23

A. For the record - IMO (In My Opinion) poor idea.
It really depends on two things -
If you will never, ever connect your lammp install to the outside world - who cares -
If you might open the server later, then whether the Perl scripts code should be 'priavte' and if you need 'datafiles' are issues. If either of those is yes, poor idea.

B. In /opt/lampp/etc/httpd.conf it tells you exactly how to do what you want. Read lines 340-416.

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Getting Perl to run on all pages..

Postby randor » 10. September 2012 14:51

Thank you, I was undecided on wether to do it or not, I know that on the shared server that I currently use my website on you can run perl from any directory

I read the section and placed this:
ScriptAlias /cgi-bin "/home/MyName/www/blabs/htdocs"

but it still only allows it in the cgi-bin directory, am I doing it wrong??

Thank you for your help.
randor
 
Posts: 13
Joined: 07. September 2012 17:45
XAMPP Version: 5.6.3
Operating System: Ubuntu

Re: Getting Perl to run on all pages..

Postby JonB » 10. September 2012 16:56

I'll read up on it, because I don't "know for sure". BUT I "think" you can only have one ScriptAlias per host (and it is the last one read-in).

I'm pretty sure you can 'add' folders that can contain executable files by using the +ExecCGI directive to either .htaccess or the Directory definitions (note that using +/- directives must be consistent throughout the Server). There are other conditions that must also be met, and it is a function of the folder/directory tree. All authority in Apache is heierarchical and stems (logically) from the ServerRoot, DocumentRoot and the httpd.conf file.

http://httpd.apache.org/docs/2.4/howto/cgi.html

Are you running a vhost??? If so - I'm quite sure each vhost can have its own ScriptAlias.

Good Luck.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests