Unable to parse regex

Hello All,

I am trying to hide apikey value in kong access logs. For that, I have created the custom nginx template, while starting the kong service, I am getting below error. Please help me.

[root@ip-10-100-3-171 kong]# kong restart -c nginx.conf --nginx-conf nginx-custom.conf
Kong stopped
2019/04/18 10:20:31 [warn] ulimit is currently set to “1024”. For better performance set it to at least “4096” using “ulimit -n”
Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:51: nginx: [emerg] “worker_processes” directive invalid value in /usr/local/kong/nginx.conf:5

Run with --v (verbose) or --vv (debug) for more details

[root@ip-10-100-3-171 kong]# cat nginx-custom.conf

---------------------

custom_nginx.template

---------------------

worker_processes ; # can be set by kong.conf daemon ; # can be set by kong.conf

pid pids/nginx.pid; # this setting is mandatory
error_log stderr $; # can be set by kong.conf

events {
use epoll; # custom setting
multi_accept on;
}

http {

map $request_uri $keeplog {
    ~.(?:\?|\&)apikey\=(\w{32})+ 0;
    ~/v1/users/test?apikey= 0;

    default 1;
}
log_format show_everything '$remote_addr - $remote_user [$time_local] '
    '$request_uri $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent"';

include 'nginx-kong.conf';

}
[root@ip-10-100-3-171 kong]#