Installation

Where can we set the root path in order to remove the port number in the URL?

flzhang132
Explorer

Now, our access path is:
https://splunk.company.vip:**8000**/

However, I think the port does not appear in the path.

We would like to change paths to:
https://splunk.company.vip/

Where can we set the root path in order to remove the port number in the path?

Tags (1)
0 Karma

flzhang132
Explorer

no,no
I'm not trying to change ports.
I want to remove the port in the access path.
for example
https://splunk.company.vip:8000 => https://splunk.company.vip
remove 8000 in url
please how to do

0 Karma

FrankVl
Ultra Champion

The port is not part of the access path. It is just the port. Note how it is before the first / in the URL. The URL is: <protocol>://<host>:<port>/<access path>

You cannot get rid of this port, unless you somehow enable your clients to connect on the standard https port 443. Then you can use a URL without the explicit port number.

0 Karma

wyfwa4
Communicator

The simple answer is in the web.conf file - https://docs.splunk.com/Documentation/Splunk/7.2.0/Admin/Webconf.

[settings]

set default web port to 8000

httpport = 8000

You can change this to any port you want. However, this may not work depending on your OS and configuration. For example, some Linux OS's will block you from using any port below 1024, and you need to change the security settings on the OS first.

Other options may depend on your OS or network configuration. If you are using a load balancer or reverse proxy, you can get that to redirect from port 443 to 8000 transparently. Also, a local host firewall / NAT client could do the same.

0 Karma

flzhang132
Explorer

I want to remove the port in the access path.
for example
https://splunk.company.vip:8000 => https://splunk.company.vip
remove 8000 in url
please how to do

0 Karma

wyfwa4
Communicator

This is not a Splunk limitation, just the standard way that web browsers work - they only know the port based on whether you enter HTTP (port 80) or HTTPS (port 443). If you remove the port from the URL, you need something between your browser and the web site to know that it needs to translate port 443 to port 8000. Port 8000 is non-standard for web sites. Standard browsers (such as IE or Firefox) cannot redirect to different ports, but can be manually redirected - by specifically adding the port number.

The only way this can be done within Splunk is to host the web site on port 80 or 443 so you avoid having to add the non-standard port number. Otherwise you need to add another component to do this translation. As mentioned, if you are running Splunk on Linux, one of the simplest options is to set-up the firewall to perform the translation - simply mapping any incoming port 443 connections to redirect to port 8000.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...