Seems that in the new fix_cwpsrv_logs file there are some errors:
line 14 is not completed (I suppose lack of ";" at the end)
NEW_BLOCK=" map \$http_x_real_ip \$stvarni_user_ip {\n \"\" \$remote_addr;\n default \$http_x_real_ip;\n }\n\n log_format main '\$stvarni_user_ip - \$remote_user [\$time_local] \"\$request\" \$status \$body_byte$
But then no way to restart cwpsrv.service
- "$" at the end of the line 14 seems wrong
- system says : cwpsrv: [emerg] nknown "body_byte" variable (I suppose unknown)
- system says : cwpsrv: [warn] he "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/cwpsrv/conf.d/api.conf:8 (Just warning, I suppose it should be "listen localhost ssl;")
I rewrite line 11 in cwpsrv.conf as "log_format main '$stvarni_user_ip - $remote_user [$time_local] $request $status';" so I could have cwpsrv.service restarted and have everything working.