title: How can I configure access from external ip to internal ip on GCP through nginx reverse proxy?
body: <p>Can't connect to application through External IP.</p>
  
  <p>I started gerrit code review application on GCP's vm instance(CentOS 7). 
  It works on <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a> and I can't connect to it through external IP. Also I tried to create NGINX reverse proxy, but probably my configuration is wrong. By the way after installing NGINX, the starter page were shown on external ip. </p>
  
  <pre><code># nginx configuration /etc/nginx/conf.d/default.conf
  server {
  listen 80;
  server_name localhost;
  
  auth_basic "Welcomme to Gerrit Code Review Site!";
  
  location / {
      proxy_pass   http://127.0.0.1:8080;
      proxy_set_header X-Forwarded-For $remote_addr;
      proxy_set_header Host $host;
  }
  }
  
  gerrit.config
  [httpd]
      listenUrl = proxy-http://127.0.0.1:8080/
  </code></pre>