LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2008, 02:00 AM   #1
maxome
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Rep: Reputation: 0
Running perl script with apache


Hi!

I just installed Ubuntu with Apache, and I'm trying to run a perl script but without any success... It was a pain to find where the server is located (/var/www), then I created a directory /var/www/app to put in my script, but when I go to my server e.g. http://localhost/app/main.pl, it shows the source of my script! I've changed the mode of my "app" directory to 0755, and I checked the "Allow executing files as a program" but still, nothing has changed. After that I went into the apache configuration file, apache2.conf to see if I can't find anything, then I saw this :

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


.... Sweet, now I change that text/plain to application/octet-stream, but STILL nothing... I am now out of resource

Thanks for any help,
max.
 
Old 01-06-2008, 08:59 AM   #2
zoranp
Member
 
Registered: Nov 2007
Location: Belgrade, RS
Distribution: Mandriva 2009.0 X86_64
Posts: 44

Rep: Reputation: 15
Make sure you have installed apache-mod_perl and configured it properly.

In your conf file you should have something like

<IfModule mod_perl.c>
# Provide two aliases to the same cgi-bin directory,
# to see the effects of the 2 different mod_perl modes
# for Apache::Registry Mode
Alias /app/ /var/www/app/
<Directory /var/www/app>
AllowOverride All
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options -Indexes FollowSymLinks MultiViews ExecCGI
Order allow,deny
Allow from all
</Directory>
</IfModule>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a perl script bobfinners Linux - Software 1 06-23-2005 06:18 PM
running perl script dav_y2k Linux - Newbie 3 04-25-2005 06:00 AM
Running Perl Script upon startup andy7t Linux - Software 1 04-20-2005 05:43 PM
Running perl in Apache paulm17781 Linux - Software 4 11-28-2003 01:57 PM
Have problem running .pl perl script in apache adrianmak Linux - Software 4 11-10-2003 10:31 AM


All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration