This is a quick guide for those needing to debug web apps, such as ownCloud, on QNAP hardware.
QNAP systems only come with an Apache error log by default, which only logs apache service errors, not page errors, which make impossible to debug problems on sites. The only way to get more detailed logs is to add a few new config files to Apache, as follows:
- Login to the QNAP device through SSH
- Enable .htaccess usage on Apache. To do this you need to create a new Apache configuration file:
And add the following commands:
CustomLog logs/main_log combined ErrorLog logs/error_log LogLevel info
- Reference this new configuration file on Apache main configuration file. To do this, edit Apache configuration file:
and add the following line at the end of the file:
Finally, restart Apache.
Now, this own’t work on QNAP running QTS 4.1.x onwards, as people from QNAP thought it was working far too good, and decided to through a challenge. For some reason, Apache configuration files are reset every time Apache is restarted by Qnap startup scripts. So until I get a stable solution, the workaround is to manually restart Apache:
The files will be present on /mnt/ext/opt/apache/logs/ .
Please note, all files will be restarted at 0:00, in order not to fill the partion .
Schreibe einen Kommentar