# How to create the Multiple Index for each Apache Webserver

**URL:** <https://discuss.elastic.co/t/how-to-create-the-multiple-index-for-each-apache-webserver/333492>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 15, 2023, 4:40pm UTC](https://discuss.elastic.co/t/how-to-create-the-multiple-index-for-each-apache-webserver/333492 "2023-05-15T16:40:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjeev1895](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@sanjeev1895](https://discuss.elastic.co/u/sanjeev1895)\
**Post date:** [May 15, 2023, 4:40pm UTC](https://discuss.elastic.co/t/how-to-create-the-multiple-index-for-each-apache-webserver/333492/1 "2023-05-15T16:40:23Z")

</div>

Hi,  
I'm a new to ELK stack. Can anyone advice me for my below doubt.

For example, I have a two apache webserver and I installed filebeat on that and I enabled apache module. Also I configured apache.conf file in logstash. So for now my both apache server logs sent it to one common index that I specified in apache.conf file.

My requirement is how to create the one or more index and pass the apache server logs to particular index instead of common one.  
apache server1 --\> apache.conf (logstash/conf.d)  
apache server1 --\> apache1.conf (logstash/conf.d)

Can anyone please advise this.  
Thanks

---

<div class="post-metadata">

**Author:** ![eMitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emitch/32/93607_2.png) [@eMitch](https://discuss.elastic.co/u/eMitch)\
**Post date:** [May 16, 2023, 8:21pm UTC](https://discuss.elastic.co/t/how-to-create-the-multiple-index-for-each-apache-webserver/333492/2 "2023-05-16T20:21:01Z")

</div>

Hey @sanjeev1895 and welcome to the community!

You could use the server name from the event as it passes through Logstash as a variable in the Elasticsearch output [similar to how it's shown in the docs](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#_writing_to_different_indices_best_practices). This would send each document as it came in from Filebeat to an index with that server name in it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 13, 2023, 10:21pm UTC](https://discuss.elastic.co/t/how-to-create-the-multiple-index-for-each-apache-webserver/333492/3 "2023-06-13T22:21:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
