Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
Running perl script with apache


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/, 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,
Old 01-06-2008, 07:59 AM   #2
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


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 05:18 PM
running perl script dav_y2k Linux - Newbie 3 04-25-2005 05:00 AM
Running Perl Script upon startup andy7t Linux - Software 1 04-20-2005 04:43 PM
Running perl in Apache paulm17781 Linux - Software 4 11-28-2003 12:57 PM
Have problem running .pl perl script in apache adrianmak Linux - Software 4 11-10-2003 09:31 AM > Forums > Linux Forums > Linux - Newbie

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

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