Refine your search:

I have tried to configure a reverse proxy (using nginx) to Splunk but not work correctly. Splunk and proxy server are in the same machine. When accessing to Splunk by proxy the browser is redirectet to localhost:8000 and not work. Using the same proxy server to access other web services work fine. I have also setting the parameter tools.proxy.on to True but behavior not change. The problem was found on Linux and also Windows.

My Splunk version is the latest (4.1.3).

This is my web.conf (in etc/system/local)

 [settings]                                                            
    root_endpoint = /splunk                                               
    tools.proxy.on = True                                                 
    server.socket_host = 127.0.0.1    

What's wrong? Thanks

asked 02 Jul '10, 09:08

abradanini's gravatar image

abradanini
11
accept rate: 0%

edited 15 Oct '10, 00:35

ftk's gravatar image

ftk ♦
6.0k419


2 Answers:

Greetings,

We're using Splunk 4 (4.1.6 build 89596) and wanted to setup forward proxy, where the proxy is on a separate machine. Most of the other examples I found assumed the proxy and splunk run on the same server.

The main issue with doing this is that Splunk really wants to redirect the user directly to itself. The worst bit is that does the redirect using HTML, not any HTTP headers. (If it used HTTP headers, then Apache's mod_proxy could do the rewrite (Possibly the module mod_proxy_html can rewrite the HTML for you, but I haven't tried this). Dear splunk developers, it would be cool if you could fix the redirection method :) ).

I found that when you set 'tools.proxy.on = True' then Splunk assumes that the Web/Proxy server is running locally on the same server as the Splunk. In this case, it keeps redirecting to 127.0.0.1. Therefore, if you are running a separate Web/Proxy server, then you do NOT want to set this (leave it blank, or set 'tools.proxy.on = false').

Our solution was to set /opt/splunk/etc/system/local/web.conf like this:

[settings]
root_endpoint = /splunk
httpport = 80

Then on the separate machine running Apache (we actually are using Apache with SSL) the lines we added to the existing mod_proxy configuration were:

ProxyPass /splunk http://10.0.0.10/splunk
ProxyPassReverse /splunk http://10.0.0.10/splunk

Enjoy!

Kind regards,

Dave Seddon

dave at seddon ca

link

answered 07 Dec '10, 03:40

dave_at_seddon_ca's gravatar image

dave_at_sedd...
211
accept rate: 0%

I would suspect that you want tools.proxy.on = False

Also, the root_endpoint says that splunk will be served from :8000/splunk. Exclude that parameter if that's not what you want.

I'd try hitting the URL http://myserver:8000/splunk

link

answered 08 Jul '10, 15:40

cfergus's gravatar image

cfergus
654
accept rate: 16%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×223
×94

Asked: 02 Jul '10, 09:08

Seen: 1,618 times

Last updated: 01 Feb '11, 06:22

Copyright © 2005-2012 Splunk, Inc. All rights reserved.