Mailing List Archive

Support open source code!


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

Re: linux and CGI



Jim,
I'm not sure at what stage you are at in the installation.

An httpd server is usually stored in

	/usr/local/etc/httpd

niji:/usr/local/etc/httpd$ ls
CHANGES   README    cgi-src/  htdocs/   icons/    src/
LICENSE   cgi-bin/  conf/     httpd*    logs/     support/
niji:/usr/local/etc/httpd$ 

The binary is the httpd file which might be in /usr/local/etc/httpd/src

You have to mess with these files:

niji:/usr/local/etc/httpd/conf$ ls
access.conf       httpd.conf        mime.types        srm.conf-dist
access.conf-dist  httpd.conf-dist   srm.conf
niji:/usr/local/etc/httpd/conf$

The ones ending in .conf-dist are the ones that came with the distribution
and usually are not edited.  The other ones are used by the server.  They
are all simple text files. 

Your cgi-bin files are usually placed in :

niji:/usr/local/etc/httpd/cgi-bin$ ls
archie*        date*          fortune*       test-cgi*      uptime*
calendar*      finger*        nph-test-cgi*  test-cgi.tcl*  wais.pl*
niji:/usr/local/etc/httpd/cgi-bin$ 

cgi-bin programs can be extremely simple.  Make sure you specify 
the MIME type in the cgi-bin.  It can be as simple as:

------------- cut ---

  #!/bin/sh
  #  test program.  Does nothing

  echo Content-type: text/plain

  echo Hello World!

---- snip ----

Save the above to a file like jim_test

then do:

   # chmod +x jim_test


The server confs should be very similar to the distribution.

Feel free to ask more questions.  

Regards,
Craig


-------------
Craig Oda 	craig@example.com	
TWICS - Japan's First Public-Access Internet System, 
   TWICS - IEC Building, 1-21 Yotsuya, Shinjuku-ku, Tokyo 160 JAPAN
Main Reception: 03-3351-5977	Fax: +81-3-3353-6096
Customer Service: 3351-5481   Corporate Sales/Support: 3351-8452

-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links