Open cotosso opened 2 days ago
This needs to be fixed for both port 443 and 9090.
For port 443 it should be enough to use this fix:
uci set nginx._lan.access_log='syslog:server=unix:/dev/log,nohostname'
uci commit nginx
For port 9090 this should fix it:
root@NSec8-VM-davidem:~# diff -u /etc/nginx/conf.d/ns-ui.conf.ori /etc/nginx/conf.d/ns-ui.conf
--- /etc/nginx/conf.d/ns-ui.conf.ori 2024-10-03 11:26:06.000000000 +0000
+++ /etc/nginx/conf.d/ns-ui.conf 2024-10-31 15:01:08.168405068 +0000
@@ -6,8 +6,8 @@
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
ssl_session_cache shared:SSL:32k;
ssl_session_timeout 64m;
- error_log syslog:server=unix:/dev/log;
- access_log syslog:server=unix:/dev/log;
+ error_log syslog:server=unix:/dev/log,nohostname;
+ access_log syslog:server=unix:/dev/log,nohostname;
# enable NS UI
location / {
if you want to try it you 'll need also to restart the service:
/etc/init.d/nginx restart
Image: 23.05.5-ns.1.3.0-41-g7436b45
Try the new image, ensure configuration is set correctly. Try to update a regular installation with the new one, check that the values get updated.
Currently, the log format used by
nginx
differs from other logs, as it writes the hostname twice, causing inconsistency and visual misalignment with the rest of the log entries. This behavior can be seen in the following examples:Expected Behavior (similar to other logs):
Current Nginx Behavior:
Explanation and Purpose
Proposed Solution
Modify the nginx log format to prevent the hostname from being written twice.
Components
NethSecurity version: 8-23.05.5-ns.1.3.0