Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #225626 > unrolled thread

setting up Apache2 to execute cgi-bin perl scripts

Started byGary Dale <gary@extremeground.com>
First post2020-07-31 17:20 +0200
Last post2020-07-31 18:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  setting up Apache2 to execute cgi-bin perl scripts Gary Dale <gary@extremeground.com> - 2020-07-31 17:20 +0200
    Re: setting up Apache2 to execute cgi-bin perl scripts Henning Follmann <hfollmann@itcfollmann.com> - 2020-07-31 17:40 +0200
      Re: setting up Apache2 to execute cgi-bin perl scripts [SOLVED] Gary Dale <gary@extremeground.com> - 2020-07-31 18:50 +0200

#225626 — setting up Apache2 to execute cgi-bin perl scripts

FromGary Dale <gary@extremeground.com>
Date2020-07-31 17:20 +0200
Subjectsetting up Apache2 to execute cgi-bin perl scripts
Message-ID<AyEZb-3Bv-1@gated-at.bofh.it>
My server is running Debian/Stable on an AMD64 system.

I'm trying to set up its local Apache2 service to execute cgi-bin 
scripts but I'm having some problems getting it to work.

I note that /etc/apache2/conf-enabled contains a link to 
/etc/apache2/conf-available/serve-cgi-bin.conf so I'm assuming that 
cgi-bin is enabled. The .conf contains a ScriptAlias directive which I 
believe redirects /cgi-bin/ to /usr/lib/cgi-bin/ but that's as far as I 
can get.

I don't want to tamper with the conf-available scripts so I went along 
with their settings. First I tried to link the script I want executed to 
the file in the site's public_html/cgi-bin/ folder but that didn't work. 
Next I tried copying the file to /usr/lib/cgi-bin but got the same 
results. Even when I changed the ownership of the directory and its 
files from root:root to www-data:www-data, the script still doesn't execute.

Instead when I click on the page's submit button, I get a dialog box 
asking me what program I want to use to open the file (which gives me 
the option of Kate).

To be clear, the perl script is marked a+x and it does work on the 
external web server that I use to host the live site. Also, I have 
restarted the apache2 service multiple times even though the config has 
not changed.

Can anyone figure out what I'm missing?

Thanks.

[toc] | [next] | [standalone]


#225629

FromHenning Follmann <hfollmann@itcfollmann.com>
Date2020-07-31 17:40 +0200
Message-ID<AyFix-3Ih-17@gated-at.bofh.it>
In reply to#225626
On Fri, Jul 31, 2020 at 11:12:53AM -0400, Gary Dale wrote:
> My server is running Debian/Stable on an AMD64 system.
> 
> I'm trying to set up its local Apache2 service to execute cgi-bin scripts
> but I'm having some problems getting it to work.
> 
> I note that /etc/apache2/conf-enabled contains a link to
> /etc/apache2/conf-available/serve-cgi-bin.conf so I'm assuming that cgi-bin
> is enabled. The .conf contains a ScriptAlias directive which I believe
> redirects /cgi-bin/ to /usr/lib/cgi-bin/ but that's as far as I can get.
> 
> I don't want to tamper with the conf-available scripts so I went along with
> their settings. First I tried to link the script I want executed to the file
> in the site's public_html/cgi-bin/ folder but that didn't work. Next I tried
> copying the file to /usr/lib/cgi-bin but got the same results. Even when I
> changed the ownership of the directory and its files from root:root to
> www-data:www-data, the script still doesn't execute.
> 
> Instead when I click on the page's submit button, I get a dialog box asking
> me what program I want to use to open the file (which gives me the option of
> Kate).
> 
> To be clear, the perl script is marked a+x and it does work on the external
> web server that I use to host the live site. Also, I have restarted the
> apache2 service multiple times even though the config has not changed.
> 
> Can anyone figure out what I'm missing?
> 

Did you enable it?
sudo a2enmod cgi


-H



-- 
Henning Follmann           | hfollmann@itcfollmann.com

[toc] | [prev] | [next] | [standalone]


#225644 — Re: setting up Apache2 to execute cgi-bin perl scripts [SOLVED]

FromGary Dale <gary@extremeground.com>
Date2020-07-31 18:50 +0200
SubjectRe: setting up Apache2 to execute cgi-bin perl scripts [SOLVED]
Message-ID<AyGoi-4kD-7@gated-at.bofh.it>
In reply to#225629
On 2020-07-31 11:32, Henning Follmann wrote:
> On Fri, Jul 31, 2020 at 11:12:53AM -0400, Gary Dale wrote:
>> My server is running Debian/Stable on an AMD64 system.
>>
>> I'm trying to set up its local Apache2 service to execute cgi-bin scripts
>> but I'm having some problems getting it to work.
>>
>> I note that /etc/apache2/conf-enabled contains a link to
>> /etc/apache2/conf-available/serve-cgi-bin.conf so I'm assuming that cgi-bin
>> is enabled. The .conf contains a ScriptAlias directive which I believe
>> redirects /cgi-bin/ to /usr/lib/cgi-bin/ but that's as far as I can get.
>>
>> I don't want to tamper with the conf-available scripts so I went along with
>> their settings. First I tried to link the script I want executed to the file
>> in the site's public_html/cgi-bin/ folder but that didn't work. Next I tried
>> copying the file to /usr/lib/cgi-bin but got the same results. Even when I
>> changed the ownership of the directory and its files from root:root to
>> www-data:www-data, the script still doesn't execute.
>>
>> Instead when I click on the page's submit button, I get a dialog box asking
>> me what program I want to use to open the file (which gives me the option of
>> Kate).
>>
>> To be clear, the perl script is marked a+x and it does work on the external
>> web server that I use to host the live site. Also, I have restarted the
>> apache2 service multiple times even though the config has not changed.
>>
>> Can anyone figure out what I'm missing?
>>
> Did you enable it?
> sudo a2enmod cgi
>
>
> -H
>
That did the trick. Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web