Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by Bobby Anamater » Wed, 08 Apr 1998 04:00:00



I am using Apache 1.2.4 on a Digital Unix 4.0D system.

I have a cgi-bin directory and I have been able to execute
many perl script thru an html form.

I am know attempting to set up a counter, which I came across
on the net.  The author says to insert this line into my
index.html page:

<!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

The author also states that server side setup is different from
server to server.

Can anyone explain how to configure Apache to enable this to
work ?

I am open to other suggestions as well, the goal being to add
a counter to an index page.

All feedback is greatly appreciated,
-- bobby --

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by Adam M. Donah » Wed, 08 Apr 1998 04:00:00


: <!--#exec cgi="..."-->
: The author also states that server side setup is different from
: server to server.
: Can anyone explain how to configure Apache to enable this to
: work ?

First, make sure the script is in the correct cgi-bin directory and that
its permissions are correctly set.  It should be executable.  

Then, in your access.conf, turn on server-side includes for the directory
in which the document containing the SSI resides.  Also, since it's a cgi
exec, make sure you've configured the ScriptAlias for the cgi-bin
directory (or set up a handler and made that directory ExecCGI enabled).

Adam

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by Matt Tayl » Mon, 13 Apr 1998 04:00:00



Quote:>I am using Apache 1.2.4 on a Digital Unix 4.0D system.

>I have a cgi-bin directory and I have been able to execute
>many perl script thru an html form.

>I am know attempting to set up a counter, which I came across
>on the net.  The author says to insert this line into my
>index.html page:

><!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

>The author also states that server side setup is different from
>server to server.

>Can anyone explain how to configure Apache to enable this to
>work ?

>I am open to other suggestions as well, the goal being to add
>a counter to an index page.

>All feedback is greatly appreciated,
>-- bobby --

Ok, im not the most knowledgeable but your dealing with a server side
include.  

make sure srm.conf contains the following

AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddHandler server-parsed .shtml
AddType text/html .shtml

Now rename the document to .shtml instead of .html and it should work.
If you can figure out how to do it without renameing the document

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by James E. Robinson, I » Mon, 13 Apr 1998 04:00:00



> Ok, im not the most knowledgeable but your dealing with a server side
> include.  
> make sure srm.conf contains the following
> AddIcon /icons/layout.gif .html .shtml .htm .pdf
> AddHandler server-parsed .shtml
> AddType text/html .shtml

Yep, that'll do it.

> Now rename the document to .shtml instead of .html and it should work.
> If you can figure out how to do it without renameing the document


:-)

AddHandler server-parsed .html

And, voila, all pages are server-parsed.  This, of course, could easily
slow down your server considerably.  I got tired of needing XBitHack and
didn't have it set...now all pages are server parsed.  Probably 50% of
the content provided is generated through SSI.  With the moderate amount
of content the server provides, it made sense for me to do that.

  Enjoy,
    James

--
 James E. Robinson, III   /   Systems Programmer
 [www.four11.com] Keywords: first=james last=robinson domain=ncstate
   The Lord is my strength and song, and is become my salvation.
                                                -- Psalm 118:14

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by j a y » Wed, 15 Apr 1998 04:00:00



Quote:}AddHandler server-parsed .html

It is also possible to use the Xbithack

i.e.
srm.conf (or anywhere really that you have directives contained)

--------

XbitHack on

--------

Then you would use standard *.html and simply set the bit for
execution.  The web server will recognize this and treat it
as it were *.shtml  A side benefit is it looks less foreign
to visitors to your site and allows you to keep search engines
coming to the same files such as index.html

See www.apache.org for more information on this.

Latra,
Jay

--

                                     http://www.fudge.org
 Some people call me Q-thrul... others call me on a phone
\___________THE USENET GREASE DRIPPINGS PLATE____________/

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by Kevin P. Ne » Thu, 16 Apr 1998 04:00:00




>}AddHandler server-parsed .html
>It is also possible to use the Xbithack
>i.e.
>srm.conf (or anywhere really that you have directives contained)
>--------
>XbitHack on
>--------
>Then you would use standard *.html and simply set the bit for
>execution.  The web server will recognize this and treat it
>as it were *.shtml  A side benefit is it looks less foreign
>to visitors to your site and allows you to keep search engines
>coming to the same files such as index.html

Side benefit?

Does anyone actually care when writing pages what extension goes on
them?

I get the impression you have actually seen people complain that URLs
look "foreign" because they didn't match *.html?

Plus, wouldn't search engines hit the *.shtml pages anyway because the
server would return type text/html? If not, it seems like the spider
is broken. I mean, if there was any doubt as to the type of a document
then the spider could always do a HEAD to verify the type.

Anyway, how's it going Jay? Gonna find us a big enough place to throw
a Geekfest?
--
XCOMM Kevin P. Neal, Junior, Comp. Sci.     -   House of Retrocomputing


XCOMM "Good grief, I've just noticed I've typed in a rant. Sorry chaps!"

 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by Alan J. Flavel » Fri, 17 Apr 1998 04:00:00


(about XBitHack)

Quote:> Side benefit?

> Does anyone actually care when writing pages what extension goes on
> them?

Possibly.  But the interesting part about XBitHack IMHO is the way that
it can be used to make an SSI document cacheable.
 
 
 

Apache and <!--#exec cgi="/cgi-bin/counter/counter.cgi" -->

Post by WWW server manag » Tue, 28 Apr 1998 04:00:00






>>}AddHandler server-parsed .html

>>It is also possible to use the Xbithack
>...

>>Then you would use standard *.html and simply set the bit for
>>execution.  The web server will recognize this and treat it
>>as it were *.shtml  A side benefit is it looks less foreign
>>to visitors to your site and allows you to keep search engines
>>coming to the same files such as index.html

>Side benefit?

Links from bookmarks and search engines (or your other pages) do not
break if you want to switch a page between SSI and non-SSI, since you can
stick with .html for all HTML pages.

Quote:>Plus, wouldn't search engines hit the *.shtml pages anyway because the
>server would return type text/html? If not, it seems like the spider
>is broken. I mean, if there was any doubt as to the type of a document
>then the spider could always do a HEAD to verify the type.

From the viewpoint of a search engine or browser, there shouldn't be any
distinction - both are inherently going to be text/html, though without
XBitHack or equivalent the SSI-generated pages will lack a Last-Modified
header (but pages can lack that header for other reasons, so it says nothing
reliably about whether it's SSI-generated).

                                John Line
--
University of Cambridge WWW manager account (usually John Line)

 
 
 

1. Apache and "exec cgi", "exec cmd".

Is there a way to let ALL users in machine use <!--#exec cgi=...> in ALL
pages, but not allow <!--#exec cmd=...> at the same time. I know I could
disable both, but "exec cgi" method allows users to use simple counters,
etc. in their pages, while not allowing them to use '/usr/bin/finger' or
other "dangerous" commands.

--

2. More serial ports for Powerbook 3400 in OS9/Linux, any way?

3. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

4. Cut/Paste In X core dumps

5. counter.cgi in cgi-bin won't work

6. help with Domino

7. Help... My <!--#exec cgi="/cgi-bin/counter"--> no longer works

8. red hat linux 5.1 firewall problem

9. cgi-bin "everything is being exec"?

10. HTTPd Exec CGI Error "invalid CGI ref getwd"

11. Possible to implement counters in Apache httpd without cgi-bins?

12. CGI-BIN Counter

13. >>>Compiling 2.0 problem: "asm86: Command not found" <<<