Unix command

What command I have to use to search for some file.conf on the server ?

i found the answer, thanks.
second question is :

how can i find the string by searching all files on the server ?

Hmm.... is this by chance for a homework assignment? For some reason it smells like a homework thing.:rolleyes:

Very useful reply!!!!!!!!!!!!!!!
Thank you for your time.

Sorry....

It was just a simple question.... since one of the rules for these boards is no homework.... I was merely checking....

I'm sure doeboy meant no disrespect.
We try to discourage "homework" questions on the forum.

To answer you question, I will refer you to the following
"man" pages..

grep(1)
strings(1)
find(1)

...any or all of which can be used to locate files and strings
within files (there are more).

I hope this helps (and is not your homework assignment). :wink:

The problem is:
we got a dedecated (freeBSD 4.7)server for one of our very popular websites.
And there's a number of CONFIG problems we have to fix.
We are newbies in the UNIX but we can't offord to hire anybody to fix it.

By the way, maybe somebody knows:

our ROOT has over 200 messages a day with subject:

Message (webalizer: not found)
I want to change the path to LOG file
And so far as i can see the webalizer-CONFIG file just doesn't exist.
I built one , but there's still the same message...
I just want to find where the file is which saing to look up for log file in "/var/log/httpd-access.log"

Thank you

You best bet would be to state your problem/issue
with as much detail as possible and state your desired
results (what you are trying to accomplish) again with
as much relevant details as appropriate. My expierence
with the folks on this forum is that they are all genuinely
concerned and will try very hard to help anyone with
problems or questions regarding UNIX configs, programming,
etc.

Please go ahead and give us more details and I'm sure
you will get a flood of good information.
:slight_smile:

And again, I apologize, My browser is going crazy again
and I only get the first few lines somtimes.

I know you gave more details this time. :smiley:

What do you get when you do...

cd /usr/local/share/doc/apache
ls -l webalizer

From the message, it looks like webalizer is not being found.

<b>Thank you rwb1959</b>

But problem is that apache has been reinstalled in different Dir and log file now located in "/usr/local/apache/logs/access_log"

Thank you

Where exactly are you getting this from...

"our ROOT has over 200 messages a day with subject:

Cron webalizer -pQ -o /usr/local/share/doc/apache/webalizer
/var/log/httpd-access.log

Message (webalizer: not found) "

When you say "ROOT" do you mean the unix "root"
user account or is the your webroot?
I assumed it was in your "root" user's mailbox.
This implies that a "cron" job is failing
and from the "Message", it implies that the
"webalizer" is having some sort of problem
or that it is not being run because it cannot
be found.

You should be able to find your apache executable
by logging in as "root" and do...

find / -name httpd -print

...you should see somthing like...

/usr/local/apache/bin/httpd

...likewise, you can find the apache config file..

find / -name httpd.conf -print

...let me know what you find.

When I said "ROOT" I meant the unix "root" user account .
Yes, it was in "root" user's mailbox.

yes the "httpd" is located here: /usr/local/apache/bin/httpd

and we got about 20 "/usr/local/apache/bin/httpd " processes running on the server

The config file is here:
/usr/local/apache/conf/httpd.conf

Thanks

OK then. :slight_smile:

Now you can examine the httpd.conf file
and "see" where things are being written to.
You can...

vi /usr/local/apache/conf/httpd.conf

...and you can make changes to the log file
section as you like.

By the way, it is normal to have many httpd's
running. You can also control how many httpd's
are run.

Thank you for reply but it doesn't help

I can't see any record anyhow related with a webalizer :frowning:

by the way
I can generate the report by usung:

but after that everything is going as it used to be (same ROOT messages)

Thank you

Apache itself has nothing to do with webalizer per se.

I was pointing this out because I thought you also wanted
to know how to configure apache :confused:

Anyway, the first thing you should do is find webalizer...

find / -name webalizer -print

...next, check root's cron file; as root do...

crontab -l

...this will list out the cron job file for root which is where the
emails (about webalizer errors) are comming from.
Post that output as well so we can go over the specific
entry. I'm assuming that webalizer may be complaining that
it cannot find the apache access log at: /var/log/httpd-access.log
You should also do...

fins / -name httpd-access.log -print

...to find exactly where that file is. You can then edit the cron
job file by, as root do...

crontab -e

...and change the /var/log/httpd-access.log in the webalizer line
to the correct location.

Don't worry, we'll get there :cool:

webalizer is located in (/usr/local/bin/webalizer)

Sorry for the dumb question.
But I have problems to eddit this line :slight_smile:
Do I have to run some special command ?

Thanks

Sorry about that...

I should have been more concise about the "crontab -e" stuff.
This command will bring up the crontab file in vi for editing.
If you are not familiar with vi then I would suggest another
method (a later post). However, for now just get out of that
by doing...

:q!<Enter_key>

Essentially, you only do that to actually edit the crontab file.
Before we do that, I wanted to "see" what was in it and
also find out the exact location of the log file.

It appears that /var/log/httpd-access.log is actually there
as verified by...

virt1-180# find / -name httpd-access.log -print
/var/log/httpd-access.log
virt1-180#

...since I'm not a "webalizer" guru, I'm going to have to read
through (the very sparse) documentation but I suspect that
there is somthing wrong with the first parameter...

-o /usr/local/share/doc/apache/webalizer

...I will get back with more info.

Thank you:)

by the way
Are you a sendmail guru ?
If yes, than I have a few more questions :slight_smile:

According the the webalizer docs I have found
at: http://tvcnet.com/services/webalizer/readme.txt
the "-o" option specifies an output directory...

-o dir This options specifies the output directory for the reports.
If not specified here or in a configuration file, the current
default directory will be used for output.
Config file keyword: OutputDir

...so you need to verify if the directory
/usr/local/share/doc/apache/webalizer
exists. You can do this by...

cd /usr/local/share/doc/apache/webalizer

...or...

cd /usr/local/share/doc/apache
ls -l

...and you should see a webalizer directory...

drwxr-xr-x 2 root 1024 Oct 10 2001 webalizer

...or somthing like that. Can you verify this?

On the question of sendmail, if you search this
forum for "sendmail", you will find several
threads which may have answers for you. Otherwise,
you should start a new thread. I personally only
"hack" around with sendmail. There are others
with considerably more knowledge on that. :wink: