create new tag
, view all tags

SID-02316: Apache 2.4 incorrectly handling twiki .pl files

Status: Asked Asked TWiki version: 5.1.4 Perl version:
Category: Server OS: Centos 7 Last update: 10 months ago

I recently upgraded to Apache 2.4 from 2.2 and since then the twiki .pl files are being downloaded by the browser instead of being executed. Mod_perl and mod_cgi are up to date and enabled in the conf file. In the conf file I also included the following line

AddHandler cgi-script .cgi .pl

Is there anything else I need to do to make apache handle the .pl files correctly?

-- TWiki Guest - 2017-06-05

Discussion and Answer

There are some strange things here:

  • On Linux systems, there's usually no need for a .pl suffix.
  • mod_perl requires SetHandler perl-script for the bin directory, with an exception for configure.

Probably your best bet is to create a fresh Apache config file with TWiki's ApacheConfigGenerator which provides "working" configurations for Apache 2.2 and Apache 2.4, with and without mod_perl, and compare it with your settings. If you directly compare the Configurator's settings for 2.2 and 2.4, you'll spot a difference:

Apache 2.2 Apache2.4
Order Allow,Deny
Allow from all
Require all granted

Apache's info for upgrading from 2.2 to 2.4 explains why: https://httpd.apache.org/docs/2.4/upgrading.html

-- Harald Jörg - 2017-06-06

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Status Asked
Title Apache 2.4 incorrectly handling twiki .pl files

TWiki version 5.1.4
Server OS Centos 7
Web server Apache 2.4
Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2017-06-06 - HaraldJoerg
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.