Apache doesn"t execute perl scripts
am 12.11.2008 14:01:41 von Mustafa Aldemir
Hello,
I am running Apache 2 under a Debian server. I installed Awstats and
configured it as stated in its documentation. Perl is running, I could
update Awstats database from the console. I updated added the following
lines to my Apache configuration, and restarted it.
When I want to enter the www.domain.com/awstats/awstats.pl the browser
asks to download the file or open it in text editor.
Can you please help me point the problem out?
thanks,
Mustafa
AddType application/x-perl-httpd .pl
AddHandler perl-script .pl
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
AllowOverride None
Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
SetHandler perl-script
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Re: Apache doesn"t execute perl scripts
am 12.11.2008 14:11:12 von Adam Prime
Mustafa Aldemir wrote:
>
> AddType application/x-perl-httpd .pl
> AddHandler perl-script .pl
>
> LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
> LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
>
>
> AllowOverride None
> Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> SetHandler perl-script
>
>
> Alias /awstatsclasses "/usr/share/awstats/lib/"
> Alias /awstats-icon/ "/usr/share/awstats/icon/"
> Alias /awstatscss "/usr/share/doc/awstats/examples/css"
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> ScriptAlias /awstats/ /usr/lib/cgi-bin/
You need:
PerlHandler Apache::Registry
(or one of the other CGI emulators) in your directory section. take a
look at:
http://perl.apache.org/docs/1.0/guide/intro.html#toc_Apache_ _Registry
It looks like you're running mp1, so this response assumes that.
Adam
Re: Apache doesn"t execute perl scripts
am 12.11.2008 14:44:47 von Mustafa Aldemir
Adam Prime wrote:
> Mustafa Aldemir wrote:
>
>>
>> AddType application/x-perl-httpd .pl
>> AddHandler perl-script .pl
>>
>> LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
>> LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
>>
>>
>> AllowOverride None
>> Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> Order allow,deny
>> Allow from all
>> SetHandler perl-script
>>
>>
>> Alias /awstatsclasses "/usr/share/awstats/lib/"
>> Alias /awstats-icon/ "/usr/share/awstats/icon/"
>> Alias /awstatscss "/usr/share/doc/awstats/examples/css"
>> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> ScriptAlias /awstats/ /usr/lib/cgi-bin/
>
>
> You need:
>
> PerlHandler Apache::Registry
>
> (or one of the other CGI emulators) in your directory section. take a
> look at:
>
> http://perl.apache.org/docs/1.0/guide/intro.html#toc_Apache_ _Registry
>
> It looks like you're running mp1, so this response assumes that.
>
> Adam
>
thanks it worked after pasting these lines in the virtualhost configuration