httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] Script CGI with shell
Date Tue, 04 Sep 2018 19:06:39 GMT
On Tue, Sep 4, 2018 at 3:04 PM Rodrigo Cunha <rodrigo.root.rj@gmail.com> wrote:
>
> Hello, i have a question, i try start a shell(bash) script in my apache2 and not work,
i seting bellow diretive in my vhost but not work:
> <Directory "/opt/dev/www/www.tmp.oduvaldocozzi.intranet/public_html/dir">
>     Options +ExecCGI
>         AddHandler cgi-script .cgi .pl
You have to list the extension you'll use (.sh)
> </Directory>
>
> root@HTTPS:dir #ls -l /opt/dev/www/www.tmp.oduvaldocozzi.intranet/public_html/dir/
> total 12
>
> -rwxr-xr-x 1 webmaster dev 31 Set  4 15:48 x.sh
>
> But the bash script notwork, only display the file content:
> #!/bin/bash
> echo "Hello world"
>

You need to print out headers, like Content-Type, followed by an extra
pair of \r\n.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message