Filebeat config for nginx access & error logs

I got it solved. Will edit the post. Btw Can you please take a look at this new topic Filebeat multiline codec not working in my case ?