[GUIDE] Logs 101 - Ubuntu / Debian Version - ACCESS, MAILSERVER AND APACHE LOGS
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.
Unmetered servers starting from $12.00 USD p/m. Xeon® E-2134 for $50.00 p/m ||| Xeon® Silver 4110 for $80.00 p/m
Live server stock ||| Feel free to contact me for custom deal.