4.x Nginx access log not configured

Version 4.5.0
Firmware Type release8
Compile Time 2024-01-23 12:40:18 (UTC+00:00)

Nginx access.log not configured by default
no log rotate available on error log or access log

Access Log:

Error Log:

nginx conf:

What is the solution

replace the off with this:

service nginx restart

You should now see a lot of access logs displayed.

1 Like

this help thanks your way

There will be too much log then!

idea is to use log rotation to counteract the issue

Are there any plans to implement either of these features? (enabling of log and log rotation)

Both are vital to security insights

seems log mounted to tmp anyways

if tmp dumping setup properly this should be fine. Other option is remote log and flush log

for others possible to find the thread

root@{hostname}:~# df /var/log/nginx
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   201148      1076    200072   1% /tmp

For routers with usb or sd card storage, I configure sd card formatted as extroot, log_file option with logrotate. Here are the formulas


1 Like

You can do it easily by yourself.

Which isn’t really recommended because it will cause read / write on the flash. Since the flash isn’t replaceable it’s better to just save the logs into RAM or using a log server, if needed.

equal thought

but consumer router should enable

point good

you reply below post yes?

formulas stand idea good

maybe no survival here formula good

Correct. The default log location is /var which is /tmp. So after extroot, I changed log_file location like /usr/log so that it survives reboot.

1 Like

make perfect fact if need fix problems