title: Why do I get AH00526 Syntax Error and Invalid "command '\xc2\xa0'" when I restart apache2?
body: <p>I am following this Apache-Passenger <a href="https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/" rel="nofollow noreferrer">integration guide</a> for hosting Ruby Apps. I have come across what appears to be an encoding error.</p>
  
  <p>I created a test.conf file at the location <code>/etc/apache2/sites-available</code> and added the following virtual host entry to the file:</p>
  
  <pre><code>&lt;VirtualHost *:443&gt;
      ServerName some.domain.net
          ServerAlias some.domain.net
  
      # Tell Apache and Passenger where your app's 'public' directory is
      DocumentRoot /var/www/myApp/code/public
  
      PassengerRuby /usr/bin/ruby2.3
  
      # Relax Apache security settings
      &lt;Directory /var/www/myApp/code/public&gt;
        Allow from all
        Options -MultiViews
        # Uncomment this if you're on Apache &gt;= 2.4:
        Require all granted
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I then enabled the test.conf file by running <code>a2ensite test.conf</code>. However, when I tried to restart the apache server using <code>sudo apache2ctl restart</code>, I get this error output:</p>
  
  <pre><code>Nov 11 13:57:11 myserver apachectl[25287]: AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/test.conf:
  Nov 11 13:57:11 myserver apachectl[25287]: Invalid command '\xc2\xa0', perhaps misspelled or defined by a module not include
  </code></pre>
  
  <p>Full screenshot here:
  <a href="https://i.stack.imgur.com/OsIpR.png" rel="nofollow noreferrer">Error message: Apache failed to restart</a></p>
  
  <p>The first error refers to line 2 of my test.conf file, which is the <code>ServerName</code> field in the format of some.domain.net (leads to my DDNS provider). I don't see how this could be causing the error?
  The second error points to an invalid command which translates to 'Non-breaking space' in UTF-8, what is this all about?</p>
  
  <p>Any pointers on how to fix this would be amazing. Thanks in advance!</p>