Re: simple newbie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi eric,

thanks for your reply.

i added
  AddHandler cgi-script .cgi
to my .htaccess file, but httpd still returns
the contents of index.cgi (not the result)

On Thu, Jan 13, 2011 at 11:41 PM, Eric Covener <covener@xxxxxxxxx> wrote:
> > Options +ExecCGI
> >
>
> Requires two directives: http://httpd.apache.org/docs/2.2/howto/cgi.html

root@duo:/var/www# ls -la
total 12
drwxrwxrwx  2 root root   38 2011-01-13 23:53 .
drwxr-xr-x 16 root root 4096 2011-01-13 22:31 ..
-rw-r--r--  1 root root   45 2011-01-13 23:53 .htaccess
-rwxr-xr-x  1 root root   69 2011-01-13 23:09 index.cgi
root@duo:/var/www# cat .htaccess
Options +ExecCGI
AddHandler cgi-script .cgi
root@duo:/var/www# wget localhost && cat index.html && rm index.html
--2011-01-13 23:53:54--  http://localhost/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... failed: Connection refused.
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 69 [text/plain]
Saving to: `index.html'

100%[======================================>] 69          --.-K/s   in 0s

2011-01-13 23:53:54 (9.18 MB/s) - `index.html' saved [69/69]

#!/bin/bash
cat <<EOF
Content-type: text/html

hi there from cgi
EOF



thanks, jack.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux