Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Perl scripts not executing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cuban
Guru
Guru


Joined: 23 Aug 2003
Posts: 448
Location: Houston, TX

PostPosted: Sun Jan 02, 2005 7:03 pm    Post subject: Perl scripts not executing Reply with quote

Hi all, I'm trying to execute some perl scripts on my apache server. I know CGI is working, because I have another virtual host using it okay. I cannot get it to work on this one for some reason though.

Code:
<VirtualHost 192.168.5.3>
    ServerName johnny5.cuban.cc
    DocumentRoot /var/www/localhost/htdocs/
</VirtualHost>

<Directory "/var/www/localhost/htdocs/firewall">
        AllowOverride None
        Options ExecCGI FollowSymLinks Includes
        Order allow,deny
        Allow from all
</Directory>


Code:
4.0K -rwxr-xr-x  1 apache apache 2.3K Jan  2 12:52 about
4.0K -rwxr-xr-x  1 apache apache 2.5K Jan  2 12:52 pix_event_create
8.0K -rwxr-xr-x  1 apache apache 4.6K Jan  2 12:52 pix_event_create_process
8.0K -rwxr-xr-x  1 apache apache 4.5K Jan  2 12:52 pix_event_edit
8.0K -rwxr-xr-x  1 apache apache 5.2K Jan  2 12:52 pix_event_edit_process
4.0K -rwxr-xr-x  1 apache apache 3.9K Jan  2 12:52 pix_event_id_add
4.0K -rwxr-xr-x  1 apache apache 4.0K Jan  2 12:52 pix_event_id_process
8.0K -rwxr-xr-x  1 apache apache 5.3K Jan  2 12:52 pix_event_management
8.0K -rwxr-xr-x  1 apache apache 6.8K Jan  2 12:52 pix_event_view
8.0K -rwxr-xr-x  1 apache apache 6.2K Jan  2 12:52 pix_ids_id
8.0K -rwxr-xr-x  1 apache apache 6.4K Jan  2 12:52 pix_ids_logs
 16K -rwxr-xr-x  1 apache apache  15K Jan  2 12:52 pix_search_logs
8.0K -rwxr-xr-x  1 apache apache 4.5K Jan  2 12:52 pix_search_result_ids
8.0K -rwxr-xr-x  1 apache apache 7.1K Jan  2 12:52 pix_search_result_traffic
 20K -rwxr-xr-x  1 apache apache  20K Jan  2 12:52 pix_stats
 16K -rwxr-xr-x  1 apache apache  14K Jan  2 12:52 pix_traffic_id
8.0K -rwxr-xr-x  1 apache apache 6.8K Jan  2 12:52 pix_traffic_logs
4.0K -rwxr-xr-x  1 apache apache 2.0K Jan  2 12:52 src-whois


If you go to http://johnny5.cuban.cc/firewall/pix_stats you'll see that it doesn't execute the perl script. It simply displays the contents.
_________________
Tell your ISP to support SPF/SASL AUTH (http://spf.pobox.com) today!
Back to top
View user's profile Send private message
rvarada
n00b
n00b


Joined: 31 Dec 2004
Posts: 7

PostPosted: Sun Jan 02, 2005 8:19 pm    Post subject: Reply with quote

Is the ScriptAlias set right?
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Mon Jan 03, 2005 12:38 am    Post subject: Reply with quote

If you want to use CGI scripts outside of ScriptAlias directories then they need a handler defined. There is a handler defined in commonapache.conf for files ending .cgi:
Code:
   # AddHandler allows you to map certain file extensions to "handlers",
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action command (see below)
    #
    # If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    AddHandler cgi-script .cgi
If you rename your files to *.cgi then it should work as you expect.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum