Hello there,
I'm trying to set up an elasticsearch-Server based on an openSuSE-Appliance from here: https://susestudio.com/a/8ODadE/elastic-search-64-bit
I followed this tutorial to set up logstash and so on: https://www.digitalocean.com/community/tutorials/how-to-use-logstash-and-kibana-to-centralize-and-visualize-logs-on-ubuntu-14-04
Now I'm stuck on the NGINX-Setup and this is my current nginx.conf:
#
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
# http://FQDN:9200
#
server {
listen *:80 ;
server_name elasticsearch.b4dom1.local;
access_log /var/www/kibana3;
location / {
root /usr/share/kibana3;
index index.html index.htm;
}
location ~ ^/_aliases$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_aliases$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/_nodes$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_search$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_mapping {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
# Password protected end points
location ~ ^/kibana-int/dashboard/.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
limit_except GET {
proxy_pass http://127.0.0.1:9200;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
}
}
location ~ ^/kibana-int/temp.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
limit_except GET {
proxy_pass http://127.0.0.1:9200;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
}
}
}
When I try to start the nginx-service I get the following error (I configure everything with YaST):
"/bin/systemctl start nginx.service returned 1 (unspecified error):"
So after some time on Google, I had a look into the Error-Log and found this:
"2014/07/15 09:41:43 [emerg] 1718#0: "server" directive is not allowed here in /etc/nginx/nginx.conf:13"
Is the account not allowed to write the file or something?
I'm kinda new to linux, but it looks like some entry in the config is wrong, isn't it?
I've done everything how the tutorial has shown.
Please let me know if I forgot some important information about my system, I'll then post it afterwards.
Regards,
Chribo