NIM uses the Apache error log to display any server side errors or warnings.  These logs are accessible in the NIM UI in the HELP > Logs menu item.  When navigating to this location in the UI, if the logs appear blank, the log file permissions may need to be corrected.  

 

To check the current permissions, run the following command from the NIM VM command line:

ls -la /var/log/apache2/error.log

 

The permissions should be set as the following:

-rw-r—– root nim

 

If the file permissions do not match the above, use the following commands to correct them:

sudo chmod 640 /var/log/apache2/error.log

sudo chgrp nim /var/log/apache2/error.log

 

In addition to correcting the file permissions, you’ll need to update the log rotation template so new log files will be created with the proper permissions as they are rotated.

 

Use a text editor to update the following file:

/etc/logrotate.d/apache2

 

In the following example, we will use “vi” to edit the file, however you can use your editor of choice.

sudo vi /etc/logrotate.d/apache2

 

Once the file is open for editing, you’ll want to update the line that starts with the word “create” to the following:

create 640 root nim

 

Now save your changes.

 

The next time the error.log file is rotated, it will be created with the correct permissions to be viewed in the NIM UI