title: What is the correct way to set up a virtual host running on Apache?
body: <p>I configured apache on ubuntu 16.04 and I created a virtual host with these instructions:</p>
  
  <pre><code>&lt;Directory /var/www/html/example.com/public_html&gt;
          Require all granted
  &lt;/Directory&gt;
  &lt;VirtualHost *:80&gt;
          ServerName example.com
          ServerAlias www.example.com
          ServerAdmin webmaster@localhost
          DocumentRoot /var/www/html/example.com/public_html
  
          ErrorLog /var/www/html/example.com/logs/error.log
          CustomLog /var/www/html/example.com/logs/access.log combined
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>when I try to open the page www.example.com on my browser I see this message:</p>
  
  <pre><code>This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.
  </code></pre>
  
  <p>Should I use another name instead of "example" to solve the problem?</p>
  
  <p>Ok any name? For example "myname.com"</p>
  
  <p>For clarity, I only need this for local tests</p>