So, I have previously installed Splunk 3.x behind a reverse proxy and downloaded the latest version (4.0.6 at time of typing) expecting it to be as easy to use as before. Sadly this was not the case. There appears to be some elements which are not being translated correctly through the reverse proxy, causing Splunk to fail.
I have used the following configuration in Apache2 to no avail:
<VirtualHost *>
ServerName monitoringbox.com
DocumentRoot /path/to/nowhere
ProxyRequests off
ProxyPass /splunk http://127.0.0.1:8000/splunk
ProxyPassReverse /splunk http://127.0.0.1:8000/splunk
<Proxy /splunk/*>
Order allow,deny
Allow from all
</Proxy>
Has anyone else had more luck than me in setting up Splunk 4.x behind a reverse proxy?
The key element that needs to be changed in the Splunk web.conf is:
All good now.
I see you are mapping /splunk into /splunk of backend instance, port 8000. I don't know what is the behavior of your version, but ours (4.2) answers directly on /.
Can you try removing the /splunk part of the backend url? Like this:
One of my Splunk installs is behind a reverse proxy. Instructions are over at splunkninja.com: http://splunkninja.com/profiles/blogs/configuring-apache-as-a
I can't comment yet... replying to @sgerrand
I solved the issue creating two different rewrite rules. One for static and another for the rest of the content. Please keep in mind that my configuration is for two Splunk search heads with different contexts.
.... .... All the stuff related to servername, directory, documentroot and SSL configuration .... ....
Disable certificate checks on SSLProxy because using self-signed certs on Splunk search heads
rewrite rule to forward the request for each of the search heads
rewrite rule for the context nonstatic
rewrite for static requests
setting for sticky session on the balancers
Balacer for static requests
Balacer for nonstatic for each Splunk context this is to prepare for the future and have more than one search head in each context