# Filebeat config for nginx logs

**URL:** <https://discuss.elastic.co/t/filebeat-config-for-nginx-logs/84540>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 4, 2017, 11:21am UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-logs/84540 "2017-05-04T11:21:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [May 5, 2017, 10:11am UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-logs/84540/2 "2017-05-05T10:11:44Z")

</div>

Hi @aarishramesh,

You are defining only 1 prospector, when you write the second `paths` field, the previous one gets overriden. Check [https://www.elastic.co/guide/en/beats/filebeat/5.4/configuration-filebeat-options.html](https://www.elastic.co/guide/en/beats/filebeat/5.4/configuration-filebeat-options.html) for a good example.

In your case I would do something like:

```
- input_type: log
  paths:
    - /var/log/nginx/access.log
  document_type: nginx-access

- input_type: log
  paths:
    - /var/log/nginx/error.log
  document_type: nginx-error

```

Let me know if that works for you!

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-config-for-nginx-logs/84540)._
