|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Nov 2004
Messaggi: 326
|
[Ubuntu] Installazione mod-perl su Apache
Vorrei eseguire script server-side in Perl, perciò ho installato il modulo mod-perl in questo modo:
apt-get install libapache2-mod-perl2 Poi dal browser ho tentato di lanciare uno script (index.pl) ma il server non me lo esegue, mi chiede se voglio aprire o scaricare il file. Quindi evidentemente ho saltato un passo. Ho controllato in /etc/apache2/mods-enabled/, e ci sono perl.conf e perl.load, quindi il modulo è stato installato bene. Poi non ho capito bene se dovevo farlo, ma nel file /etc/apache2/apache2.conf ho inserito questa sezione: Codice:
<IfModule mod_perl.c> PerlModule Apache::Registry Alias /perl/ /var/www/perl/ <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On PerlSetupEnv On </Location> </IfModule> Grazie.
__________________
The problem with Troubleshooting is that often trouble shoots back... |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Nov 2004
Messaggi: 326
|
Oggi ho provato a togliere mod_perl e ad installare CGI.pm .
Scarico CGI.pm-3.29.tar.gz, faccio la procedura: Codice:
perl Makefile.PL make make test make install Help! ![]()
__________________
The problem with Troubleshooting is that often trouble shoots back... |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Nov 2004
Messaggi: 326
|
Ok ho risolto!
Scrivo la soluzione in caso serva a qualcuno: - Nel file apache2.conf ho aggiunto le seguenti direttive: Codice:
<Directory /dir/contenente/gli/script> Options +ExecCGI </Directory> AddHandler cgi-script .cgi .pl chmod a+x nomefile.pl
__________________
The problem with Troubleshooting is that often trouble shoots back... |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 23:16.