# Logstast apache configuration

**URL:** https://discuss.elastic.co/t/logstast-apache-configuration/33343
**Category:** Logstash
**Created:** [October 30, 2015, 6:39am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343 "2015-10-30T06:39:28Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [October 30, 2015, 6:39am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/1 "2015-10-30T06:39:28Z")

</div>

Guysss please help me out...i have created one configuration file with the code

input {  
file {  
path =\> "/var/log/messages"  
type =\> "syslog"  
}

file {  
path =\> "/var/log/apache/access.log"  
type =\> "apache"  
}  
}

output {  
elasticsearch {  
host =\> localhost  
}  
stdout { codec =\> json }  
}

It showing me same error again n again.

bin/logstash -f logstash.conf

Error: No config files found: /home/krishna/Downloads/logstash-2.0.0-rc1/logstash.conf  
Can you make sure this path is a logstash config file?  
You may be interested in the '--configtest' flag which you can  
use to validate logstash's configuration before you choose  
to restart a running system.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 30, 2015, 6:53am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/2 "2015-10-30T06:53:45Z")

</div>

> [@krish0608](#):
>
> /home/krishna/Downloads/logstash-2.0.0-rc1/logstash.conf

Is that where your config file lives?

---

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [October 30, 2015, 6:55am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/3 "2015-10-30T06:55:30Z")

</div>

NO,right path is

/home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 30, 2015, 6:56am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/4 "2015-10-30T06:56:05Z")

</div>

Pass that in as the full path then 🙂

---

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [October 30, 2015, 7:01am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/5 "2015-10-30T07:01:59Z")

</div>

I had already passed it but it showing me same error.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 30, 2015, 7:02am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/6 "2015-10-30T07:02:59Z")

</div>

`bin/logstash -f /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf` still errors?

What does `ls -l /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf` show?

---

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [October 30, 2015, 7:08am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/7 "2015-10-30T07:08:07Z")

</div>

-rw-rw-r-- 1 krishna krishna 235 Oct 30 12:34 /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 30, 2015, 7:09am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/8 "2015-10-30T07:09:29Z")

</div>

So `bin/logstash -f /home/krishna/Downloads/logstash-2.0.0-rc1/bin/logstash.conf` still errors?

It sounds like just a path issue.

---

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [October 30, 2015, 7:11am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/9 "2015-10-30T07:11:03Z")

</div>

Error: The setting `host` in plugin `elasticsearch` is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format. If you have any questions about this, you are invited to visit [https://discuss.elastic.co/c/logstash](https://discuss.elastic.co/c/logstash) and ask.  
You may be interested in the '--configtest' flag which you can  
use to validate logstash's configuration before you choose  
to restart a running system.

I got new error.

---

<div class="post-metadata">

### Author: ![gruccolo](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@gruccolo](https://discuss.elastic.co/u/gruccolo)
#### Post date: [October 30, 2015, 6:48pm UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/10 "2015-10-30T18:48:26Z")

</div>

If you have logstash\bin in your path, put your config file into logstash\conf and issue command from there.

---

<div class="post-metadata">

### Author: ![gruccolo](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@gruccolo](https://discuss.elastic.co/u/gruccolo)
#### Post date: [October 30, 2015, 6:50pm UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/11 "2015-10-30T18:50:23Z")

</div>

Oh and forgot to mention that will cut you command down significantly to be logstash -f logstash.conf

---

<div class="post-metadata">

### Author: ![renevdm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renevdm/32/5730_2.png) [@renevdm](https://discuss.elastic.co/u/renevdm)
#### Post date: [October 30, 2015, 11:26pm UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/12 "2015-10-30T23:26:28Z")

</div>

To solve this, change the output section into this:

```
 output {
 elasticsearch {
 hosts => localhost
 }
 stdout { codec => json }
}

```

Small change, but this makes the elasticsearch plugin work again. Don't forget to restart logstash after editing your config file.

---

<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: [July 6, 2017, 5:24am UTC](https://discuss.elastic.co/t/logstast-apache-configuration/33343/13 "2017-07-06T05:24:46Z")

</div>


