LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache newbie/mrtg newbie (newbie to everything) (http://www.linuxquestions.org/questions/linux-software-2/apache-newbie-mrtg-newbie-newbie-to-everything-775001/)

new2nagios 12-11-2009 01:43 PM

apache newbie/mrtg newbie (newbie to everything)
 
Hi I have been trying to get some basic info on a couple of things so I appologize if this sounds totally stupid

I have an apache web server up & running. If I go to my web browser and type in http://localhost/manual it brings up the man page for apache.

I am trying to get mrtg to work & part of the install process has this line:
"This example below will create an mrtg config file in /home/mrtg/cfg assuming this is a directory visible on your webserver"

EXAMPLE:
[root@dns sbin]# cfgmaker --global 'WorkDir: /home/httpd/mrtg' \
> --global 'Options[_]: bits,growright' \
> --output /home/mrtg/cfg/mrtg.cfg \
> community@router.abc.xyz


I have manually created the /home/mrtg/cfg directory so when I run config maker everthing appears to be working...


[root@dns sbin]# cd /usr/local/mrtg-2/bin/

[root@dns bin]# ./cfgmaker --global 'WorkDir: /home/httpd/mrtg' \
> --global 'Options[_]: bits,growright' \
> --output /home/mrtg/cfg/mrtg.cfg \
> Expxxxxxx08@65.205.xx.xxx
[root@dns bin]# env LANG=C ./mrtg /home/mrtg/cfg/mrtg.cfg
2009-12-11 12:03:12, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_3.old updating log file
2009-12-11 12:03:13, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_5.old updating log file

2009-12-11 12:03:13, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_6.old updating log file

[root@dns bin]#
[root@dns sbin]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

I also tried changing /home/mrtg/cfg to /var/www/mrtg (which I created)

My question is how do I make a directory visible on my webserver?

I read that .htaccess provides access. I have been reading the manual pages on getting started...but nothing appears to point me to anything conclusive. Also, I installed Nagios on this same server and its working too when I browse to http://localhost/nagios (someoone asked if nagios is running in /var/www/nagios) - but it is not I am not sure where nagios web is installed as I just followed nagios step-by-step instructions and viola it works!

I have no colleagues to ask about this and web forums are my only resource, I am sure this is something simple that I need to edit. I am familiar with vi and most command line utilities in unix so most things I do manually.

thanks for any help.
Em

BTW I am running Fedora 9

Davno 12-12-2009 04:50 AM

On a normal installation of Apache, your working directory would be /var/www/html

centosboy 12-14-2009 03:25 AM

Quote:

Originally Posted by new2nagios (Post 3788114)
Hi I have been trying to get some basic info on a couple of things so I appologize if this sounds totally stupid

I have an apache web server up & running. If I go to my web browser and type in http://localhost/manual it brings up the man page for apache.

I am trying to get mrtg to work & part of the install process has this line:
"This example below will create an mrtg config file in /home/mrtg/cfg assuming this is a directory visible on your webserver"

EXAMPLE:
[root@dns sbin]# cfgmaker --global 'WorkDir: /home/httpd/mrtg' \
> --global 'Options[_]: bits,growright' \
> --output /home/mrtg/cfg/mrtg.cfg \
> community@router.abc.xyz


I have manually created the /home/mrtg/cfg directory so when I run config maker everthing appears to be working...


[root@dns sbin]# cd /usr/local/mrtg-2/bin/

[root@dns bin]# ./cfgmaker --global 'WorkDir: /home/httpd/mrtg' \
> --global 'Options[_]: bits,growright' \
> --output /home/mrtg/cfg/mrtg.cfg \
> Expxxxxxx08@65.205.xx.xxx
[root@dns bin]# env LANG=C ./mrtg /home/mrtg/cfg/mrtg.cfg
2009-12-11 12:03:12, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_3.old updating log file
2009-12-11 12:03:13, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_5.old updating log file

2009-12-11 12:03:13, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove 65.205.xx.xxx_6.old updating log file

[root@dns bin]#
[root@dns sbin]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

I also tried changing /home/mrtg/cfg to /var/www/mrtg (which I created)

My question is how do I make a directory visible on my webserver?

I read that .htaccess provides access. I have been reading the manual pages on getting started...but nothing appears to point me to anything conclusive. Also, I installed Nagios on this same server and its working too when I browse to http://localhost/nagios (someoone asked if nagios is running in /var/www/nagios) - but it is not I am not sure where nagios web is installed as I just followed nagios step-by-step instructions and viola it works!

I have no colleagues to ask about this and web forums are my only resource, I am sure this is something simple that I need to edit. I am familiar with vi and most command line utilities in unix so most things I do manually.

thanks for any help.
Em

BTW I am running Fedora 9



hi.

for default mrtg config, run rpm -qc mrtg, assuming you installed by rpm.
there is a default skeleton file that you can just edit normally in /var/www/mrtg
mrtg normally works out of the box for an install such as fedora 9.
you shouldnt need to make a directory visible. if you are using document root, add an index file in the directory. wrt mrtg, you would need to create a symlink to the name of the html page
example on my mrtg config, the default page is the hostname. you can see this page in the mrtg directory. i just create a link to index.html so i can view this page.
If you want to just browse the directory listing, this in a .htaccess file should do it -

Options +Indexes

wrt nagios, the conf file tells you where everything is and how it is set up..
this would normally be in /etc/httpd/conf.d/nagios.conf

new2nagios 12-14-2009 09:05 AM

thanks to all who posted
 
Many thanks to everyone who replied to this post. All input was appreciated. I now have mrtg working with tweeking to be performed and I learned a bit more about apache in the process.


All times are GMT -5. The time now is 10:54 AM.