title: BrowserSync proxy on remote server with Gulp?
body: <p>I have a remote Linux server that I'm running a Node.js app on, that is proxy'ed through nginx at <code>http://www.example.com</code>.</p>
  
  <p>I have <code>gulp</code> (for SASS compiling) installed with BrowserSync. Whenever I start up <code>gulp</code> on the server, the access urls are something like this:</p>
  
  <pre><code>[BS] Access URLs:
   ----------------------------------
         Local: http://localhost:3000
      External: http://10.0.2.15:3000
   ----------------------------------
            UI: http://localhost:3001
   UI External: http://10.0.2.15:3001
   ----------------------------------
  </code></pre>
  
  <p>So, that's not going to work, cause I'm not trying to access the server via localhost. I need to access it at it's actual url: <code>http://www.example.com</code>. When I browse to <code>http://www.example.com</code> I can see in the page that BrowserSync is not injected into the page.</p>
  
  <p>I have been messing with the BrowserSync proxy options but they are not clear. I tried the following in my <code>gulp</code> task:</p>
  
  <pre><code>browserSync.init({
    proxy: {
      target: 'http://www.example.com:4000'
    }
  });
  </code></pre>
  
  <p>And then I get this:</p>
  
  <pre><code>[BS] Proxying: http://www.example.dev:4000
  [BS] Access URLs:
   ----------------------------------
         Local: http://localhost:3000
      External: http://10.0.2.15:3000
   ----------------------------------
            UI: http://localhost:3001
   UI External: http://10.0.2.15:3001
   ----------------------------------
  </code></pre>
  
  <p>But port 4000 isn't open on the firewall, so that isn't going to work. Is this the right way to do it and I just need to open that port? Why wouldn't it work with port 80? Or am I way off on this?</p>