Aliases
Hi all,
I'm trying to make it possible to see my logfiles on a browser. For instance, I want to browse to http://www.mysite.com/logfiles and see a listing of all my logfiles. Because the logfiles reside outside of the web content directory, I'm trying to set up an Alias (sorry if my terminology isn't correct, but it's a newbie forum anyway). Here's how I'm doing it: Code:
Alias /logfiles /path/to/my/logfiles When I browse to http://www/mysite.com/logfiles I get a 404. I've been online all morning looking for a solution and all I find is what I've already done. BTW, this is a RHEL 5 on a LAMP stack. Any ideas would be appreciated. |
Quote:
On another note...that's a VERY insecure thing to do. Any potential attacker can just browse your logs, and from those, get a picture of your internal network, user ID's, etc. |
hmm.. interesting.
I actually don't HAVE to see the log files in a browser, but I'd like to see them easier than using VI. What I need to look at are the access files once in a while. Do you have a recommendation of a better way to look at the log files? Thanks. |
Quote:
If you've got multiple servers, consider installing something like Nagios, that will watch log files for patters, and give you a web-page with lots of other stats too. You can secure the login on that page, and kill multiple birds with one stone. |
Thank you for the suggestions. I'm already seeing the log files using SSH. I was just looking for a better way to read them since vi is a pain. Logwatch is an option too and I'll check Nagios.
Your help is greatly appreciated. |
You can choose other editor than "vi", for example I am using viewer from "Midnight Commander".
|
Check out this howto.
http://linuxcommand.org/writing_shell_scripts.php He goes over creating a script which puts information about your machine into html formatting. With a few tweaks, you can put your log file information into the script instead, and view the logs in a browser without actually publishing the information to the web. I'm not sure if this completely solves your security issue, but you can easily just delete the file once you viewed the necessary info. And its easier than scrolling through vi :) |
All times are GMT -5. The time now is 07:35 AM. |