title: Grunt server how to set hostname and virtual host correctly?
body: <p>I would like to  test my angular app on production server on custom domain. </p>
  
  <p><strong>I tried to do by this way:</strong></p>
  
  <ul>
  <li>I deactivated Apache server</li>
  <li>I added line to /etc/hosts 127.0.0.1:9000 mydomain.loc</li>
  <li><p>I updated config into GruntFile.js</p>
  
  <p>// The actual grunt server settings</p>
  
  <pre><code>  connect: {
        options: {
          port: 9000,
          // Change this to '0.0.0.0' to access the server from outside.
          hostname: 'localhost',
          livereload: 35729
        },
        livereload: {
          options: {
            open: 'http://mydomain.loc:9000',
            base: [
              '.tmp',
              '&lt;%= yeoman.app %&gt;'
            ]
          }
        },
        test: {
          options: {
            port: 9001,
            base: [
              '.tmp',
              'test',
              '&lt;%= yeoman.app %&gt;'
            ]
          }
    },
  </code></pre></li>
  </ul>
  
  <p>After this i run  server using <strong>grunt serve command</strong>. </p>
  
  <p>Grunt is initialized, browser window is opened at correct address mydomain.loc:9000</p>
  
  <p>But server cannot be found in browser.</p>
  
  <p><strong>Question is:</strong></p>
  
  <p>What i'm doing wrong and how can i solve it?</p>
  
  <p>I suppose, that Apache is not needed for this?</p>
  
  <p>Thanks for any advice. </p>