Mailing List Archive

Support open source code!


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

Re: web server



>>>>> "Jim" == Jim Schweizer <schweiz@example.com> writes:

    Jim> Hi all, Steve T is right, I do have a server configuration
    Jim> problem with the Apache server I'm trying to set up.

[ snip ]
    Jim> PATH_TRANSLATED: '/root/public_html/tests/cgi-bin/links.pl'
[ snip ]
    Jim> Script Base Directory '/root/public_html/cgi-bin'

    Jim> CGIwrap Error: CGI Directory Not Found.

I don't see any "tests" in that Script Base Directory.

CGIs are dangerous things, so you have to say explicitly where they
may be found.  NCSA and Apache are fairly similar in this:

# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname

# If it's not in or below one of these directories, you can't use it
# unless you enable CGIs for everyone.  It may be possible to do it via
# .htaccess, but I don't think so.  These directories are *not*
# relative to ServerRoot or ~/public_html or anything like that.

# What you apparently have
# ScriptAlias /cgi-bin/ /root/public_html/cgi-bin/
# What you probably want
ScriptAlias /cgi-bin/ /root/public_html/tests/cgi-bin/
# OR
# ScriptAlias /cgi-bin/ /root/public_html/cgi-bin/
# ScriptAlias /cgi-tests/ /root/public_html/tests/cgi-bin/
# which gives TWO CGI directories, which must be specified by name,
# eg /cgi-tests/links.pl, NOT /~root/tests/cgi-bin/links.pl

# Only a crazy person would
# ScriptAlias / /
# although it should "solve" your problem (as well as making such
# wonderful stuff as "rm" available to visitors).

# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
# This is different between Apache and NCSA, NCSA is less general.

# AddType allows you to tweak mime.types
# Format: AddType type/subtype ext1
# AddHandler allows you to map certain file extensions to "handlers"
# Format: AddHandler action-name ext1

# To use CGI scripts:
#AddHandler cgi-script .cgi
# only a crazy person would
#AddHandler cgi-script .pl

You could enable that "AddHandler cgi-script" and mv "links.pl" to
"links.cgi".  Perl doesn't care....  That way "links" can be used from 
any directory the server can find, ie, below $DocumentRoot or
~/public_html.

Steve
-- 
                           Stephen John Turnbull
University of Tsukuba                                        Yaseppochi-Gumi
Institute of Policy and Planning Sciences  http://turnbull.sk.tsukuba.ac.jp/
Tennodai 1-1-1, Tsukuba, 305 JAPAN                 turnbull@example.com
-----------------------------------------------------------------
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