httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Andrews <effb...@gmail.com>
Subject Re: [users@httpd] simple newbie
Date Thu, 13 Jan 2011 12:58:42 GMT
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@gmail.com> 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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message