title: Virtualhost: AH00558: apache2: Could not reliably determine the server's fully qualified domain name
body: <p>I have a problem whenever I try to set-up a virtual host using apache on Debian 10.</p>
  <p>I am trying to set-up virtual host on the address <strong>products.crud</strong>. So the directory structure is <strong>var/www/products.crub/web</strong>.</p>
  <p>So, I created the Apache Virtual Hosts configuration file in in /etc/apache2/sites-available directory and can I also enabled it in /etc/apache2/sites-enabled directory. The content of the file named <strong>products.crud.conf</strong> is:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName products.crud
  DocumentRoot /var/www/products.crud/web
  &lt;Directory /var/www/products.crud/web&gt;
      RewriteEngine On
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . index.php [L]
  &lt;/Directory&gt;
  </code></pre>
  
  <p>So, I enabled the domain using:</p>
  <blockquote>
  <p>$ sudo a2ensite products.crud</p>
  </blockquote>
  <p>And then I tested the syntax using</p>
  <blockquote>
  <p>$ sudo apachectl configtest</p>
  </blockquote>
  <p>The problem is that I receive this error:</p>
  <blockquote>
  <p>AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fe80::2ff5:a177:ff45:30b3. Set the 'ServerName' directive globally to suppress this message
  Syntax OK</p>
  </blockquote>
  <h3>What I tried to solve the issue</h3>
  <p>I tried adding the domain in /etc/hosts</p>
  <pre><code>127.0.0.1   localhost
  #127.0.1.1  terminale
  #127.0.0.1  products.test
  127.0.0.5   products.crud
  </code></pre>
  <p>I also tried to add in apache2.conf:</p>
  <pre><code># Global configuration                                                          
  #                                                                               
  ServerName products.crud
  #                                                                               
  # ServerRoot: The top of the directory tree under which the server's            
  # configuration, error, and log files are kept.                                 
  #   
  </code></pre>
  <p>Whenever I try to connect to products.crud I see the localhost main page of apache and not my index.php. How can I solve this?</p>