title: Virtual host with IP Address on Google Compute Engine
body: <p>I have created LAMP instance on Google Compute engine and it was working properly earlier but as soon as I created production and development environment its not working.</p>
  
  <p>What I did so far is as follow :-</p>
  
  <ul>
  <li><p>I don't have the domain so its running on public ip address - For e.g. 30.30.30.205</p></li>
  <li><p>I have created <strong>development.conf</strong> file in /etc/apache2/sites-available/.</p></li>
  </ul>
  
  <p>Content of development.conf is as follow :</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      # The ServerName directive sets the request scheme, hostname and port that
      # the server uses to identify itself. This is used when creating
      # redirection URLs. In the context of virtual hosts, the ServerName
      # specifies what hostname must appear in the request's Host: header to
      # match this virtual host. For the default virtual host (this file) this
      # value is not decisive as it is used as a last resort host regardless.
      # However, you must set it for any further virtual host explicitly.
  
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html/production/application
      Alias production
  
      &lt;Directory "/var/www/html/production/application"&gt;
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Require all granted
                Order allow,deny
                allow from all
          &lt;/Directory&gt;
  
      # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
      # error, crit, alert, emerg.
      # It is also possible to configure the loglevel for particular
      # modules, e.g.
      #LogLevel info ssl:warn
  
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  
      # For most configuration files from conf-available/, which are
      # enabled or disabled at a global level, it is possible to
      # include a line for only one particular virtual host. For example the
      # following line enables the CGI configuration for this host only
      # after it has been globally disabled with "a2disconf".
      #Include conf-available/serve-cgi-bin.conf
  &lt;/VirtualHost&gt;
  
  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>
  
  <p>Based on above config what I wish to achieve in url is <strong><a href="http://30.30.30.205/production" rel="nofollow noreferrer">http://30.30.30.205/production</a></strong> and for development it will be something like <strong><a href="http://30.30.30.205/development" rel="nofollow noreferrer">http://30.30.30.205/development</a></strong>.</p>
  
  <p>I have 2 folders inside /var/www/html - production and development in which I have set the different environment.</p>
  
  <p>After creating config file I also run the <strong>sudo a2ensite</strong> command in /sites-enabled folder.</p>
  
  <p>I haven't set the hosts in /etc as I believe I don't have the domain but not sure on this so please kindly guide me if i need to do anything here.</p>
  
  <p>After following above steps, when i try to hit the url I am not able to access the site on google cloud.</p>
  
  <p>Please kindly help or guide me how to resolve the issue.</p>