I know you can do /var/logs but I don’t know what to do, how do I read the files, because my website is refusing to connect even though I have dns and everything else configured correctly so how do I view my logs as it could be the droplet rejecting my request?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

To view the last entries of your logs you can use the tail command.

So for example, if you have an Apache service you can view the last 100 lines of the Apache error log with the following command:

tail -100 /var/log/apache2/error.log

You can also use the ls command to view all of the log files inside the /var/log folder:

ls -l /var/log

Then you can choose which log file exactly you would like to check.

Hope that this helps.