You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gary Aitken <ap...@dreamchaser.org> on 2018/03/09 03:47:23 UTC
[users@httpd] perl / cgi-bin setup issue
My first time trying to get a perl script to run, so probably something
obvious.
On freebsd 10.3, apache 2.4.25
httpd.conf:
/usr/local/etc/apache24/httpd.conf:
<IfModule>
...
ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
</IfModule
<Directory "/usr/local/www/apache24/cgi-bin">
AllowOverride None
Options ExecCGI
# (It's my understanding the above Options ExecCGI
# is not needed in this case)
Require all granted
</Directory>
The script is world executable and runs fine:
$ ./tst.pl
Content-type: text/plain; charset=iso-8859-1
hello, World!
When I fetch the page
http://my.domain.com/cgi-bin/tst.pl
all I see is the script echoed.
I have virtual hosts set up in extra/httpd-vhosts.conf;
I've tried fiddling with that as well to no avail:
<VirtualHost *:80>
...
ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
<Directory "/usr/local/www/apache24/cgi-bin/">
Options +ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
</VirtualHost>
Thanks for any pointers,
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] perl / cgi-bin setup issue
Posted by Gary Aitken <ap...@dreamchaser.org>.
On 03/08/18 21:44, Frank Gingras wrote:
> Make sure mod_cgi / mod_cgid is loaded first.
Thank you, that did the trick.
Gary
> On Thu, Mar 8, 2018 at 10:47 PM, Gary Aitken <apache@dreamchaser.org <ma...@dreamchaser.org>> wrote:
>
> My first time trying to get a perl script to run, so probably something
> obvious.
>
> On freebsd 10.3, apache 2.4.25
>
> httpd.conf:
>
> /usr/local/etc/apache24/httpd.conf:
> <IfModule>
> ...
> ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
> </IfModule
>
> <Directory "/usr/local/www/apache24/cgi-bin">
> AllowOverride None
> Options ExecCGI
> # (It's my understanding the above Options ExecCGI
> # is not needed in this case)
> Require all granted
> </Directory>
>
> The script is world executable and runs fine:
> $ ./tst.pl <http://tst.pl>
> Content-type: text/plain; charset=iso-8859-1
>
> hello, World!
>
> When I fetch the page
> http://my.domain.com/cgi-bin/tst.pl <http://my.domain.com/cgi-bin/tst.pl>
>
> all I see is the script echoed.
>
> I have virtual hosts set up in extra/httpd-vhosts.conf;
> I've tried fiddling with that as well to no avail:
> <VirtualHost *:80>
> ...
> ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
> <Directory "/usr/local/www/apache24/cgi-bin/">
> Options +ExecCGI
> AddHandler cgi-script .cgi .pl
> </Directory>
> </VirtualHost>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] perl / cgi-bin setup issue
Posted by Frank Gingras <th...@apache.org>.
Make sure mod_cgi / mod_cgid is loaded first.
On Thu, Mar 8, 2018 at 10:47 PM, Gary Aitken <ap...@dreamchaser.org> wrote:
> My first time trying to get a perl script to run, so probably something
> obvious.
>
> On freebsd 10.3, apache 2.4.25
>
> httpd.conf:
>
> /usr/local/etc/apache24/httpd.conf:
> <IfModule>
> ...
> ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
> </IfModule
>
> <Directory "/usr/local/www/apache24/cgi-bin">
> AllowOverride None
> Options ExecCGI
> # (It's my understanding the above Options ExecCGI
> # is not needed in this case)
> Require all granted
> </Directory>
>
> The script is world executable and runs fine:
> $ ./tst.pl
> Content-type: text/plain; charset=iso-8859-1
>
> hello, World!
>
> When I fetch the page
> http://my.domain.com/cgi-bin/tst.pl
>
> all I see is the script echoed.
>
> I have virtual hosts set up in extra/httpd-vhosts.conf;
> I've tried fiddling with that as well to no avail:
> <VirtualHost *:80>
> ...
> ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/"
> <Directory "/usr/local/www/apache24/cgi-bin/">
> Options +ExecCGI
> AddHandler cgi-script .cgi .pl
> </Directory>
> </VirtualHost>
>
> Thanks for any pointers,
>
> Gary
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>