Skip to content

Commit 9427746

Browse files
authored
Merge pull request #235 from splunk/docs/web-ssl
Adding docs around web ssl
2 parents e3a7bc2 + 4eda3ff commit 9427746

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/EXAMPLES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Note that for more complex scenarios, we will opt to use a [Docker compose file]
1313
* [...with HEC](#create-standalone-with-hec)
1414
* [...with any app](#create-standalone-with-app)
1515
* [...with a SplunkBase app](#create-standalone-with-splunkbase-app)
16+
* [...with SSL enabled](#create-standalone-with-ssl-enabled)
1617
* [Create standalone and universal forwarder](#create-standalone-and-universal-forwarder)
1718
* [Create heavy forwarder](#create-heavy-forwarder)
1819
* [Create heavy forwarder and deployment server](#create-heavy-forwarder-and-deployment-server)
@@ -186,6 +187,26 @@ Execute the following to bring up your deployment:
186187
$ SPLUNKBASE_PASSWORD=<splunkbase_password> SPLUNK_PASSWORD=<password> docker-compose up -d
187188
```
188189

190+
## Create standalone with SSL enabled
191+
192+
To enable SSL over SplunkWeb, you'll first need to generate your self-signed certificates. Please see the [Splunk docs](https://docs.splunk.com/Documentation/Splunk/latest/Security/Self-signcertificatesforSplunkWeb) on how to go about doing this. For the purposes of local development, you can use:
193+
```
194+
openssl req -x509 -newkey rsa:4096 -passout pass:abcd1234 -keyout /home/key.pem -out /home/cert.pem -days 365 -subj /CN=localhost
195+
```
196+
197+
Once you have your certificates available, you can execute the following to bring up your deployment with SSL enabled on the Splunk Web UI:
198+
```
199+
$ docker run --name so1 --hostname so1 -p 8000:8000 \
200+
-e "SPLUNK_HTTP_ENABLESSL=true" \
201+
-e "SPLUNK_HTTP_ENABLESSL_CERT=/home/cert.pem" \
202+
-e "SPLUNK_HTTP_ENABLESSL_PRIVKEY=/home/key.pem" \
203+
-e "SPLUNK_HTTP_ENABLESSL_PRIVKEY_PASSWORD=abcd1234" \
204+
-e "SPLUNK_PASSWORD=<password>" \
205+
-e "SPLUNK_START_ARGS=--accept-license" \
206+
-v /home:/home \
207+
-it splunk/splunk:latest
208+
```
209+
189210
## Create standalone and universal forwarder
190211
You can also enable distributed deployments. In this case, we can create a Splunk universal forwarder running in a container to stream logs to a Splunk standalone, also running in a container.
191212

0 commit comments

Comments
 (0)