TUTORIAL: Resolve the Nginx 500 error
The role of the web server is to execute HTTP/S requests & store files so as to make accessible the files that allow PBXware to function correctly.
When you log in to the PBXware web interface, you may encounter an Nginx 500 error (500 Internal Server Error), as illustrated in the following screenshot:

Cause
On PBXware, the 500 error usually occurs when the main partition is full, partition on which nginx is installed and is used.
You can check disk space usage by connecting via SSH to your machine and entering the following command which returns the list of all the machine’s partitions with their disk usage as a percentage:
df -hl NOTE:
To connect via SSH, please follow this tutorial

Here, the partition /dev/vda4 assigned to the folder /home is at 100% disk usage and is therefore saturated.
Generally, an accumulation of call logs or SIP registration logs of A callsunarchived steriskmay cause disk saturation.
These logs can be found in the following directory:
/opt/pbxware/pw/var/log/asterisk Go to the directory with the command cd.
cd /opt/pbxware/pw/var/log/asterisk In this directory, you can in particular check the file that takes up the most space with the following command:
du -sch The command of is a Linux/Unix command that allows a user to quickly obtain information about disk usage.
The argument -s (summarize) allows summarizing.
The argument -c (total) allows adding the "total" line at the bottom of the command output to see the full disk space used.
The argument -h (human readable) allows file sizes to be displayed in an understandable format (in gigabytes, for example).

Here, the log file “messages” is the largest file (6.0 G). These log files are used to list all failed SIP connection attempts on your PBXware instance. In case you have many SIP connection attempts, they will then be listed in these log files.
Note that these files may take the form of compressed archives; you can recognize them by the extension .gz (example: messages.1.gz)
Resolution
Several solutions can resolve this error:
- Increase the partition size /dev/vda4
- Purge the log file
In order to purge/empty the log file, make sure that you are in the directory /opt/pbxware/pw/var/log/asterisk enter the following command:
cat /dev/null > messages TIP:
Check that you have set up archiving of your log files in your system settings: PBXware > Settings > System > File System
Once free disk space becomes available again on the /dev/vda4 partition, the 500 error should disappear.
Note that if you want to keep these log files, download them to your local storage space through an SFTP connection. You will then be able to completely delete the “messages” with the rm command:
rm messages rm messages.1.gz 
