PDA

View Full Version : configuring cgi scripts.


apm
03-16-1999, 10:40 PM
HI,

I need to install this axs script a webloggin program.

I have a internally redirected domain tribologyindia.com. ANd I need to see the stats for this.

I need a few question answered as to where the files go for the script.

# You should place the log.txt and axs.dat files in the same directory as
# this script. If you do, you won't have to change the variables below.
# If you want to put the files somewhere else, enter the full path to these
# files:

$LogFile = '/big/dom/xarc_max/cgi-bin/log.txt';
$prefs = '/big/dom/xarc_max/cgi-bin/axs.dat';

******************************

1)where would the log.txt and ax.dat files go? would they go in the logs_cgi directory or log dir?

2) WHat should be the path used while excuting the script.

Enter the URL of your website, or part of it. If your site is both
# http://domain.com/ and http://www.domain.com/, you can simply enter
# $My_Web_Address = 'domain.com'; (substring match):

$My_Web_Address = 'tribologyindia.com';

3) is this right or should I use arc-max.com/tribology/ ?

THanks in advance for your help.

APoorva

Terra
03-16-1999, 11:33 PM
IRO==Internal Redirection/Overlay
IRM==Internal Redirection/Mapping (complicated setup with rewriting rules)

1) /big/dom/xarc_max/cgi-bin/
*if you don't change the above variables...

2) arc-max.com
tribology.com is an IRM and might have problems with executing your root domains CGI scripts... There are some known problems with IRM's and CGI scripts... IRO's work flawlessly, but the mapping involved with IRM's sometimes will not produce the desired results... IRM's were designed for serving primarly non-dynamic content or PHP3 dynamic files, but not the Perl CGI scripts from cgi-bin... You will need to test to see which will run properly, but we cannot guarantee that all scripts will run from tribology.com (served from arc-max.com cgi-bin) If you plan on heavy usage for CGI scripts, we will recommend that you purchase a full domain so that it has full access to it's dedicated cgi-bin...

3) you will need to match lines in your logfile that pull files from '/tribology/'

Our stats package can be setup to pull the information for tribology.com and seperate them... It will require you to make custom changes to the .stats.conf file... I can provide you with a link to the instructions and turn over control of that file to your uid/gid so that you can edit it...

Stats are run once a night, and any changes you make will be reflected for the entire month as the stats, each night, must process the entire months log files...

Hope this helps...

--
Terra
sysAdmin
FutureQuest

apm
03-17-1999, 12:18 AM
Hello terra,

Thnks for the prompt reply.

I havbe done what you have told. and mad the domain arc-max.com/tribology/

I have also put the log.txt and dat files in my cgi-bin dir and made them read and write (777).

I think the main reason it wasnt working was that the code was not getting executed from the html page.
Code line:
<!--#exec cgi='/big/dom/xarc_max/cgi-bin/ax.pl' -->

I looked up the error file in logs dir. ANd the follwing was written.

httpd-x21: [Tue Mar 16 22:33:08 1999] [error] [client 209.63.29.109] Options ExecCGI is off in this directory: /usr/CNC/cgi-sys/Spammers/no-harvest.pl

Please advise.

Thanks
APoorva

apm
03-17-1999, 12:22 AM
ALmost forgot,

How could I configure the resident stats program so that I can get stats for multiple domains / dir.

like arc-max.com and tribologyindia.com

or if neccessary arc-max.com/trbology/

THanks
APoorva

Terra
03-17-1999, 01:06 AM
<!--#exec cgi='/big/dom/xarc_max/cgi-bin/ax.pl' -->


This should be:
<!--#exec cgi='/cgi-bin/ax.pl' -->

Please remember that this script must run within a 10 second/8 Mb memory window... If it goes outside of those limits, then the Apache server will kill it due to excess resource usage (out of control script)...

---
Curious, I don't see how you would have picked up on my Spammers script... I'll have to check into that when I have time...
---

The link to read and configure the .stats.pl is located at:
http://www.netstore.de/Supply/http-analyze/manual/index.html

I will now turn over control of this config file to you... You will find that it is capable of many things, that go beyond our current standard configuration...

--
Terra
sysAdmin
FutureQuest

Jacob Stetser
03-17-1999, 01:16 AM
It sure ought to run in that space..

http://www.aota.net/ubb/smile.gif I'm using it on my web site, but I don't get any useful statistics out of it on FQ.. it's not catching most of the hits or referrers, and I can't analyze my visitor flow, presumably due to the fact reverse DNS resolution is off.

Anyhow... if I make a new cgi-bin directory beneath an IRD, would I have any trouble running scripts under the IRD's domain name?

apm
03-17-1999, 01:44 AM
Interesting point!

can you create a cgi-bin for a ird.

If you can i think it may run.

ALthough how do you create a cgi-bin under a ird? (is it simple as "md cgi-bin" ?)

APoorva

Terra
03-17-1999, 01:52 AM
It sure ought to run in that space..

You must not be one of the domains generating 40+ Mb raw logs a day... http://www.aota.net/ubb/wink.gif

IRD??? no such animal...

For an IRM, you can try to create a local cgi-bin directory within the IRM sub-tree, then turn on the ExecCGI or AddHandler options within that directory... The necessary rewrites get a little screwy handling CGI scripts only... It's a bit too deep to explain other than there is a race condition in the Apache processing sequence of events... Sort of the 'chicken-or-the-egg' syndrome....

With axs, will it use the ELF style of logs? Or do they need to be DLF?
http://www.netstore.de/Supply/http-analyze/manual/index.html

Because of the sheer bulk in size of all the logs we have to process, we utilize the ELF as this reduces the overhead required to parse the logs...

In the month of February, FutureQuest processed an aggregate of 1.1 terrabytes of logfiles (no kidding)... I'm eventually going to build a dedicated STATS server, that all it does is reverse resolve IP-->hostnames and process the logs into stats... The RARP process literally balooned my DNS server to needing 80megs of *non-swappable* ram... http://www.aota.net/ubb/frown.gif

--
Terra
sysAdmin
FutureQuest

apm
03-17-1999, 01:56 AM
jacob,

COuld you tell me where exactly have you kept the log.ttx and axs.dat files. What permissions etc ?

THank
APoorva

apm
03-17-1999, 02:11 AM
For an IRM, you can try to create a local cgi-bin directory within the
IRM sub-tree, then turn on the ExecCGI or AddHandler options within
that directory... The necessary rewrites get a little screwy handling
CGI scripts only... It's a bit too deep to explain other than there is a
race condition in the Apache processing sequence of events... Sort of
the 'chicken-or-the-egg' syndrome....

Terra,

Slowly, how exactly would you go about creating a cgi-bin under a IRM.

very slowly.
THANKS
apOORVA

PS. you sure about the terrabyte terra http://www.aota.net/ubb/smile.gif.. ALthough the heart of a web business is it log files. I think you should serously think this stat server thing. FOr one simple reason that without a stats you wqould be flying blind. Now tht my PS is greater than the main message let me end it. http://www.aota.net/ubb/smile.gif

Terra
03-17-1999, 02:47 AM
quick and dirty...

Telnet in...

$cd ../www/tribology
$mkdir cgi-local
$cd cgi-local
$echo "AddHandler cgi-script cgi" > .htaccess

Put in a simple CGI script: test.cgi

#!/usr/local/bin/perl
print "Content-Type: text/plain\n\n";
print "Boo!\n";

$chmod 755 test.cgi

With any luck, you will be able to access this via:
http://www.tribologyindia.com/cgi-local/test.cgi

I won't guarantee it will work, this is all conceptual... The IRM's were never really designed for CGI script capability, as that is what a full domain is for...

Spin the bottle and see if this will slide by...

--
Terra
--See you in the morning, my shift is done--
FutureQuest