# PMM Container custom URL/Port

**URL:** <https://forums.percona.com/t/pmm-container-custom-url-port/5893>\
**Category:** PMM 1.x\
**Created:** [September 28, 2017, 11:51am UTC](https://forums.percona.com/t/pmm-container-custom-url-port/5893 "2017-09-28T11:51:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonycaffe](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@tonycaffe](https://forums.percona.com/u/tonycaffe)\
**Post date:** [September 28, 2017, 11:51am UTC](https://forums.percona.com/t/pmm-container-custom-url-port/5893/1 "2017-09-28T11:51:56Z")

</div>

Hi,

I would like to customize the default setup for this not to take me to [http://IP](http://IP). I would like to manage this container in Apache vhost. How would you set it up to go to [url][https://internalIP/pmm/?[/url]](https://internalIP/pmm/?%5B/url%5D)

I am new to containers and PMM but I would like this to be behind SSL/TLS via HTTPS and add the URL to include /pmm/ so it doesnt become the root URL. I would also like this not to be exposed on the external IP only the internal eth1 IP.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [October 6, 2017, 8:23am UTC](https://forums.percona.com/t/pmm-container-custom-url-port/5893/2 "2017-10-06T08:23:37Z")

</div>

it is impossible to change base URL inside PMM Server container itself because PMM Client relies on such urls like .

it is possible to configure PMM to work via SSL, see [URL][Percona Monitoring and Management](https://www.percona.com/doc/percona-monitoring-and-management/security.html%5B/URL%5D)

You can setup server and clients inside the private network and don’t expose PMM interface to the public internet.  
If you want – you can configure independently installed HTTP reverse proxy (like nginx or apache) for exposing PMM interface via public URL like [URL=“[https://internalip/pmm/?](https://internalip/pmm/?)”][https://internalIP/pmm/[/URL]](https://internalIP/pmm/%5B/URL%5D)  
keep in mind that you need to configure rewriting rules on your reverse proxy, like in the following nginx example

```auto
rewrite ^/pmm$ /pmm/;
location /graph {
proxy_pass http://PMM-SERVER-IP:80;
rewrite ^/pmm/(.*) /$1 break;
}

```

---

<div class="post-metadata">

**Author:** ![HTF1](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@HTF1](https://forums.percona.com/u/HTF1)\
**Post date:** [May 31, 2018, 3:59pm UTC](https://forums.percona.com/t/pmm-container-custom-url-port/5893/3 "2018-05-31T15:59:09Z")

</div>

Can you please help me with Nginx configuration to expose PMM interface via URL like [url][https://exmaple.com/pmm[/url]](https://exmaple.com/pmm%5B/url%5D) (or just [url][https://exmaple.com/graph[/url]](https://exmaple.com/graph%5B/url%5D) if that’s easier).

Currently with the config below only Grafana works but other features like “PMM Query Analytics” or “PMM Add Instance” don’t:

```auto

...
location ^~ /graph/ {
access_log off;
proxy_pass http://pmm-server;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization "";
proxy_max_temp_file_size 0;
proxy_buffer_size 4K;
proxy_buffers 64 4k;
}
...

```
