[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl displayed as text, Not HTML



Dave wrote: 
> hello
> 
> when a .pl file or .cgi file is clicked on  to our server, apache is
> serving back a text code page, not html
> 
> all of our sites were working under the old service Deb 4, our new
> Server Deb 9.x has a setting off.
> 
> we have included a link to our http.conf file.
> 
> http://culser.com/ex/apache2.txt
> 
> 
> please advise.

This:

Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/mods-available/socache_dbm.load
Include /etc/apache2/mods-available/socache_memcache.load
Include /etc/apache2/mods-available/socache_shmcb.load
Include /etc/apache2/mods-available/ssl.load
Include /etc/apache2/mods-available/ssl.conf
Include /etc/apache2/mods-available/usertrack.load
Include /etc/apache2/mods-available/rewrite.load

means you don't understand that mechanism.

Keep all the files in mods-available. Create symlinks to them
from mods-enabled when you want them to take effect.

Same approach goes for site-enabled/available and
conf-enabled/available.

Anyway: you need a perl module to run perl CGI:
libapache2-mod-perl2

and you need to enable CGI in each directory that you want it
in via something like

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
                <Directory "/usr/lib/cgi-bin">
                        AllowOverride None
                        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                        Require all granted
                </Directory>

Jumping from Debian 4 to Debian 9 is really big; among other
things, you definitely went from a 1.x series Apache to a 2.4
series Apache.

-dsr-


Reply to: