# Specifying Index in URL as Parameter

**URL:** <https://discuss.elastic.co/t/specifying-index-in-url-as-parameter/26899>\
**Category:** Kibana\
**Created:** [August 5, 2015, 2:10pm UTC](https://discuss.elastic.co/t/specifying-index-in-url-as-parameter/26899 "2015-08-05T14:10:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenGoodall](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@StephenGoodall](https://discuss.elastic.co/u/StephenGoodall)\
**Post date:** [August 5, 2015, 2:10pm UTC](https://discuss.elastic.co/t/specifying-index-in-url-as-parameter/26899/1 "2015-08-05T14:10:22Z")

</div>

Hi,  
Does anyone know if it is possible to specify the index as part of the URL?  
This would enable me to use a ProxyPass in Nginx to direct users to the Production log indices or the Development log indices by using something like:

[kibana.address.com/production](http://kibana.address.com/production)  
and  
[kibana.address.com/development](http://kibana.address.com/development)

Which would then specify logstash-production-\* or logstash-dev-\* as the index when redirecting to Kibana  
Thanks

---

<div class="post-metadata">

**Author:** ![StephenGoodall](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@StephenGoodall](https://discuss.elastic.co/u/StephenGoodall)\
**Post date:** [August 6, 2015, 10:48am UTC](https://discuss.elastic.co/t/specifying-index-in-url-as-parameter/26899/2 "2015-08-06T10:48:28Z")

</div>

Managed to figure this out in case anyone else wanted to use it.  
It's not perfect (still trying to figure out how to have different htaccess files for each URL - so ignore those bits):

location /xxx/? {  
set $index 'logstash-xxx\*';  
set $full (columns:!(\_source),index:$index,interval:auto,query:(query\_string:(analyze\_wildcard:!t,query:'\*')),sort:!('@timestamp',desc));  
auth\_basic "Please Login using a user with permissions for xxx";  
auth\_basic\_user\_file /etc/nginx/conf.d/kibana-xxx.htpasswd;  
return 301 [http://kibana.address.com/#/discover?\_g=()&\_a=$full;](http://kibana.address.com/#/discover?_g=()&_a=%24full;)  
}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:15pm UTC](https://discuss.elastic.co/t/specifying-index-in-url-as-parameter/26899/3 "2017-07-06T14:15:09Z")

</div>

Closed on July 6, 2017, 2:15pm UTC


