Re: simple newbie

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

 



On Thu, January 13, 2011 13:28, Jack Andrews wrote:
> hi guys,
>
> a total newbie question.
>
> i have created a cgi script 'index.cgi' in /var/www:
>
> root@duo:/var/www# ls -l
> total 8
> -rwxr-xr-x 1 root root  69 2011-01-13 23:09 index.cgi
> -rw-r--r-- 1 root root 177 2011-01-13 22:31 index.html
>
> and i've created a .htaccess:
>
> root@duo:/var/www# cat .htaccess
> Options +ExecCGI
>
> then i remove index.html and run:
>
> root@duo:/var/www# wget localhost && cat index.html
> --2011-01-13 23:14:51--  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:14:51 (9.21 MB/s) - `index.html' saved [69/69]
>
> #!/bin/bash
> cat <<EOF
> Content-type: text/html
>
> hi there from cgi
> EOF
>
> note that apache has given me the contents of index.cgi,
> not the result of running it:
>
> root@duo:/var/www# ./index.cgi
> Content-type: text/html
>
> hi there from cgi

- Is there a special reason why you want to use .htaccess instead of
adding the directive to the central configuration?
- Do you have the proper AllowOverride?

Joost

---------------------------------------------------------------------
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