Unable to Access Web Interface on Cloud Virtual Machines


I just installed Graylog to explore it.
I am using a VM on Microsoft Azure for this.
Below are the details of my installation:

OS: Ubuntu 14.04.5 LTS
Mongo: 3.4.4
Java 1.8.0_131
Graylog - 2.2
Public IP of the VM: PublicIP
Private IP of the VM: PrivateIP

Graylog config:

is_master = true
node_id_file = /etc/graylog/server/node-id
password_secret = ##
root_username = admin
root_password_sha2 = ##
plugin_dir = /usr/share/graylog-server/plugin
rest_listen_uri =
web_listen_uri =

Now, when I start Graylog and try to open the URL: PublicIP:9000,
I am getting the error:
We are experiencing problems connecting to the Graylog server running on PrivateIP:9000/api/

I tried using, localhost, hostname, etc. for the rest_listen_uri parameter.
My understanding from the error message is that REST_URI should point to an URL which is publicly available. But I can’t use the PublicIP there else it gives “Unable to Bind” issue during startup.

I am unable to make progress.
Please suggest.

Please read http://docs.graylog.org/en/2.2/pages/configuration/web_interface.html and set web_endpoint_uri accordingly.