Re: [1/8OT] How to open .cgi

2012-03-11 Thread Mark Neidorff
On Saturday 10 March 2012 10:50:14 pm David Christensen wrote:
> On 03/10/2012 05:03 PM, Mark Neidorff wrote:
> > You misunderstand CGI.  It is a way that a script that generates a web
> > page can have that page displayed in a browser window.  CGI is internal
> > to the web browser.  You use a language like perl or whatever to
> > generate the script that the web server picks up and processes.
> 
> Sentence 3 is incorrect.  Sentences 2 and 4 are close.  Please see:
> 
>  http://en.wikipedia.org/wiki/Common_Gateway_Interface
> 
> 
> HTH,
> 
> David

Right you are.  I meant "web server" in sentence #2.  Also, by internal, I 
meant that it can be added into or enabled in the server.  wikipedia.org is 
always my friend.

Mark


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201203111023.22831.m...@neidorff.com



Re: [1/8OT] How to open .cgi

2012-03-10 Thread David Christensen

On 03/10/2012 05:03 PM, Mark Neidorff wrote:

You misunderstand CGI.  It is a way that a script that generates a web page
can have that page displayed in a browser window.  CGI is internal to the web
browser.  You use a language like perl or whatever to generate the script that
the web server picks up and processes.


Sentence 3 is incorrect.  Sentences 2 and 4 are close.  Please see:

http://en.wikipedia.org/wiki/Common_Gateway_Interface


HTH,

David


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4f5c20f6.2060...@holgerdanske.com



Re: [1/8OT] How to open .cgi

2012-03-10 Thread Mark Neidorff
On Wednesday 07 March 2012 11:53:02 pm lina wrote:
> Hi,
> 
> I don't know how to run .cgi in debian (or iceweasle)
> 
> I put it in
> 
> :/var/www/try$ ls -l
> 
> total 4
> -rwxr-xr-x 1 root root 212 Mar  8 12:29 hello.cgi
> 
> Thanks for any suggestions,
> 
> Best regards,

You misunderstand CGI.  It is a way that a script that generates a web page 
can have that page displayed in a browser window.  CGI is internal to the web 
browser.  You use a language like perl or whatever to generate the script that 
the web server picks up and processes.

Better regards,

Mark


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201203102003.46923.m...@neidorff.com



Re: [1/8OT] How to open .cgi

2012-03-09 Thread David Christensen

On 03/07/2012 11:47 PM, lina wrote:

Do you use podwebserver?


I use Apache:

2012-03-09 21:53:39 dpchrist@p43400e ~
$ sudo apache2 -v
Server version: Apache/2.2.16 (Debian)
Server built:   Feb  5 2012 21:02:00


David


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4f5aecbf.4010...@holgerdanske.com



Re: [1/8OT] How to open .cgi

2012-03-09 Thread David Christensen

On 03/07/2012 09:58 PM, lina wrote:

# df -h /usr/lib/cgi-bin/
Filesystem  Size  Used Avail Use% Mounted on
/dev/sda915G  7.2G  7.0G  51% /usr

is the /usr/lib/cgi-bin/ big enough if keep those scripts there, or
better use some links?


7.0 GB = 7.5 billion bytes (7.5E+09), which is far more space than you 
should ever need for CGI scripts and related files, libraries, 
programming languages, etc..



David


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4f5ae0a0.40...@holgerdanske.com



Re: [1/8OT] How to open .cgi

2012-03-07 Thread lina
On Thu, Mar 8, 2012 at 1:13 PM, David Christensen
 wrote:
> On 03/07/2012 08:53 PM, lina wrote:
>>
>> I don't know how to run .cgi in debian (or iceweasle)
>
>
> Start here:
>
>    http://wiki.debian.org/Apache
>
>
> To install Apache, run the following command (as root):
>
>    # apt-get install apache2
>
>
> The file system location for CGI scripts is set in the Apache default site
> configuration file:
>
>    # grep -r cgi-bin /etc/apache2/sites-available/default
>            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>            
>
>
> Place a script into the /usr/lib/cgi-bin directory:
>
>    # vi /usr/lib/cgi-bin/hello.pl
>
>    # cat /usr/lib/cgi-bin/hello.pl
>    #!/usr/bin/perl
>    use strict;
>    use warnings;
>    print "Content-Type: text/plain\n\nhello, world!";
>    exit 0;
>
>
> Make it executable:
>
>    # chmod +x /usr/lib/cgi-bin/hello.pl
>
>
> Check the syntax:
>
>    # perl -c /usr/lib/cgi-bin/hello.pl
>    /usr/lib/cgi-bin/hello.pl syntax OK
>
>
> Run the script in your shell:
>
>    # perl /usr/lib/cgi-bin/hello.pl
>    Content-Type: text/plain
>
>    hello, world!
>
>
> Browse the script:
>
>    http://localhost/cgi-bin/hello.pl
>
>    hello, world!
>
>
> HTH,

It works, thanks again for your help.

Well, a little concern,

# df -h /usr/lib/cgi-bin/
Filesystem  Size  Used Avail Use% Mounted on
/dev/sda915G  7.2G  7.0G  51% /usr

is the /usr/lib/cgi-bin/ big enough if keep those scripts there, or
better use some links?
>
> David
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject
> of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: http://lists.debian.org/4f584009.7090...@holgerdanske.com
>


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAG9cJm=g+afqp03sy97i7qp41z0g2avnygwj93x1hscv_tp...@mail.gmail.com



Re: [1/8OT] How to open .cgi

2012-03-07 Thread David Christensen

On 03/07/2012 08:53 PM, lina wrote:

I don't know how to run .cgi in debian (or iceweasle)


Start here:

http://wiki.debian.org/Apache


To install Apache, run the following command (as root):

# apt-get install apache2


The file system location for CGI scripts is set in the Apache default 
site configuration file:


# grep -r cgi-bin /etc/apache2/sites-available/default
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/



Place a script into the /usr/lib/cgi-bin directory:

# vi /usr/lib/cgi-bin/hello.pl

# cat /usr/lib/cgi-bin/hello.pl
#!/usr/bin/perl
use strict;
use warnings;
print "Content-Type: text/plain\n\nhello, world!";
exit 0;


Make it executable:

# chmod +x /usr/lib/cgi-bin/hello.pl


Check the syntax:

# perl -c /usr/lib/cgi-bin/hello.pl
/usr/lib/cgi-bin/hello.pl syntax OK


Run the script in your shell:

# perl /usr/lib/cgi-bin/hello.pl
Content-Type: text/plain

hello, world!


Browse the script:

http://localhost/cgi-bin/hello.pl

hello, world!


HTH,

David


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4f584009.7090...@holgerdanske.com



Re: [1/8OT] How to open .cgi

2012-03-07 Thread Kelly Clowers
On Wed, Mar 7, 2012 at 20:53, lina  wrote:
> Hi,
>
> I don't know how to run .cgi in debian (or iceweasle)
>
> I put it in
>
> :/var/www/try$ ls -l
> total 4
> -rwxr-xr-x 1 root root 212 Mar  8 12:29 hello.cgi
>

Do you have a web server with a cgi interface setup (e.g. Apache with mod_cgi)?


Cheers,
Kelly Clowers


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAFoWM=_sjH2djf5RxVaZiDBCTUdgRZp2L0Lb=zixn+8jruc...@mail.gmail.com



[1/8OT] How to open .cgi

2012-03-07 Thread lina
Hi,

I don't know how to run .cgi in debian (or iceweasle)

I put it in

:/var/www/try$ ls -l
total 4
-rwxr-xr-x 1 root root 212 Mar  8 12:29 hello.cgi

Thanks for any suggestions,

Best regards,


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cag9cjmk-awsqp8ap76u2vciwhkfmbqasmhk816otzr7hzom...@mail.gmail.com