Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

[GUIDE] Logs 101 - Ubuntu / Debian Version - ACCESS, MAILSERVER AND APACHE LOGS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[GUIDE] Logs 101 - Ubuntu / Debian Version - ACCESS, MAILSERVER AND APACHE LOGS

drserverdrserver Member, Host Rep

I invite @HardCloud to make CentOS version.

If you have new in this "server" world you probably don't know much about how your system works. It looks very quiet but instead your server is YELLING all the time. Only thing that you are probably missing is how to listen all those information.

All system logs are located in /var/log/ folder. We will use tail command to see live log data.

For example to see authentication log you simply do following:

tail -f /var/log/auth.log

Try mentioned above and with 2nd window try to log in to your system. You will see how system is capturing all attempts into this file.

To exit live log view use break combination CTRL with pressed C ( CTRL + C ).


If you wish to see your mail server log do following:

tail -f /var/log/mail.log

Here you can debug your mail server. See if you are blacklisted or bounces or whatever you are looking for what is related to mail server. Again to exit use CTRL + C.


I will cover basic Apache setup with no https. Apache uses 2 main log files. One is access log where you can see in real time who is accessing your hosted web page or service and other is error log where apache stores all application and config errors.

For access log use:

tail -f /var/log/apache/access.log

For error log use:

tail -f /var/log/apache/error.log

Again to exit use good old CTRL + C


All log outputs are straight forward. You will get most of the infos that you really need to solve basic problems. There are many logs in /var/log/ folder. It is safe to explore them and you will learn a lot.

Comments

  • Or echo tail bla bla bla setup cron to email to you every day so you can read it at work and pretend you are working

    Thanked by 1Radi
Sign In or Register to comment.