title: Apache2 restart fail with error: "Apache2: bad user name: USERNAME
body: <p>I have LAMP server on Ubuntu Server 12.04 on VPS. I am running on it an owncloud 5 instance,  mail server and some simple pure-html sites on virtual hosts. Recently I installed Rainy server for Tomboy sync, but I am not sure if that was the reason for the error:</p>
  <p>When I try to restart apache (service apache2 restart) I get error:</p>
  <pre><code>apache2: bad user name: USERNAME 
  Action 'configtest' failed
  The apache error log may have more information.
  </code></pre>
  <p>But there are no information in /var/logs/apache2/error.log</p>
  <p>After google search I was only able to find people reporting similar error with ${APACHE_RUN_USER} instead or &quot;USERNAME&quot; or with some existing username in that place.</p>
  <p>But I do not have &quot;USERNAME&quot; user in the system.</p>
  <p>in my envvars I have:</p>
  <pre><code>export APACHE_RUN_USER=www-data
  export APACHE_RUN_GROUP=www-data
  </code></pre>
  <p>in apache.conf:</p>
  <pre><code>User ${APACHE_RUN_USER}
  Group ${APACHE_RUN_GROUP}
  </code></pre>
  <p>but changed to:</p>
  <pre><code>User www-data
  Group www-data
  </code></pre>
  <p>still gave the same error.</p>
  <hr />
  <h3>Solved:</h3>
  <p>As suggested by <a href="https://stackoverflow.com/users/1695482/vladimir-dimitrov">Vladimir Dimitrov</a>
  I did:</p>
  <pre><code>grep -r USERNAME *
  </code></pre>
  <p>in my Apache folder, which gave result:</p>
  <pre><code>sites-available/mydomain.com: WSGIDaemonProcess snowy user=USERNAME home=/path/to/snowy sites-enabled/mydomain.com: WSGIDaemonProcess snowy user=USERNAME home=/path/to/snowy 
  </code></pre>
  <p>and helped my realize, that I left one virtual host file after my experiments with snowy installation.
  After removing it, server works fine.</p>