Get troubles in creating Kibana index pattern when the Apache proxy is up

I'm trying to put Apache proxy in front of Kibana and I have made a config file for apache. But when I start to create index pattern in Kibana interface, the 404 error prompts. From the first image, there is a match there and it should work. When I hit the next button, there will be an error there. I can see in the error it reports about /, but I have added the bundles in the proxy config file. Any suggestion? (BTW, the Kibana works fine without the proxy)

Part of the config file for proxy is:

<Location /elasticsearch>
ProxyPass http://localhost:9200/
ProxyPassReverse http://localhost:9200/

<Location /app/kibana>
ProxyPass http://localhost:5601/app/kibana
ProxyPassReverse http://localhost:5601/app/kibana

<Location /status>
ProxyPass http://localhost:5601/status
ProxyPassReverse http://localhost:5601/status

<Location /api/status>
ProxyPass http://localhost:5601/api/status
ProxyPassReverse http://localhost:5601/api/status

<Location /api/xpack>
ProxyPass http://localhost:5601/api/xpack
ProxyPassReverse http://localhost:5601/api/xpack

<Location /api/saved_objects>
ProxyPass http://localhost:5601/api/saved_objects
ProxyPassReverse http://localhost:5601/api/saved_objects

<Location /ui/fonts/open_sans>
ProxyPass http://localhost:5601/ui/fonts/open_sans/
ProxyPassReverse http://localhost:5601/ui/fonts/open_sans/

<Location /bundles>
ProxyPass http://localhost:5601/bundles
ProxyPassReverse http://localhost:5601/bundles

<Location /es_admin/>
ProxyPass http://localhost:5601/es_admin/
ProxyPassReverse http://localhost:5601/es_admin/

<Location /api/console>
ProxyPass http://localhost:5601/api/console
ProxyPassReverse http://localhost:5601/api/console

<Location /plugins/kibana/>
ProxyPass http://localhost:5601/plugins/kibana/
ProxyPassReverse http://localhost:5601/plugins/kibana/

<Location /plugins/graph/>
ProxyPass http://localhost:5601/plugins/graph/
ProxyPassReverse http://localhost:5601/plugins/graph/

<Location /app/timelion>
ProxyPass http://localhost:5601/app/timelion
ProxyPassReverse http://localhost:5601/app/timelion

<Location /plugins/timelion/>
ProxyPass http://localhost:5601/plugins/timelion/
ProxyPassReverse http://localhost:5601/plugins/timelion/

<Location /plugings/monitoring/>
ProxyPass http://localhost:5601/plugins/monitoring/
ProxyPassReverse http://localhost:5601/plugins/monitoring/

<Location /plugins/security/>
ProxyPass http://localhost:5601/plugins/security/
ProxyPassReverse http://localhost:5601/plugins/security/

And part of the Kibana.yml is:

# Kibana is served by a back end server. This setting specifies the port to use. #server.port: 5601

# Kibana is served by a back end server. This setting specifies the port to use. #server.port: 5601
# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address. "localhost"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects
# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests
# to Kibana. This setting cannot end in a slash.
#server.basePath: ""

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server's name. This is used for display purposes. "your-hostname"

# The URL of the Elasticsearch instance to use for all your queries.
#elasticsearch.url: "http://localhost:9200"

# When this setting's value is true Kibana uses the hostname specified in the
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "user"
#elasticsearch.password: "pass"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files validate that your Elasticsearch backend uses the same key files.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Optional setting that enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

# To disregard the validity of SSL certificates, change this setting's value to 'none'.
#elasticsearch.ssl.verificationMode: full

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
# the elasticsearch.requestTimeout setting.
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
# must be a positive integer.
#elasticsearch.requestTimeout: 30000

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}

Have you tried setting server.basePath?

Thank you! I changed server.basePath to "/kibana" and it works fine now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.