Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do some PHP work, and decided to install LAMP. I've followed the instructions on the following site here to install, and also add an extra site (using /var/wwww and having to gksu nautilus files seemed pointless) so I followed the instructions here under "Virtual Hosts".

However, I completed the instructions and when I try and restart Apache I get the following message:

dan@inn0min4t3:~$ sudo /etc/init.d/apache2 restart
Syntax error on line 4 of /etc/apache2/sites-enabled/mysite:
DocumentRoot takes one argument, Root directory of the document tree
Action 'configtest' failed.
The Apache error log may have more information.!

And this is my mysite config:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /home/dan/Documents/Website Design/helheimr
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory /home/dan/Documents/Website Design/helheimr/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Sorry if it's obvious. I spent a while looking on Google and I couldn't find much, I did read that I might need to remove the '/' at the end, and I tried that but I had the same result.

Thank you.

share|improve this question
up vote 2 down vote accepted

Isn't it the space in DocumentRoot /home/dan/Documents/Website Design/helheimr?

There are two arguments:

  • /home/dan/Documents/Website
  • Design/helheimr.

Maybe just rename Website Design to WebsiteDesign, adjust the Apache config file, and reload Apache config file.

share|improve this answer
Ah, thank you. I just realised that as well. Now I'm getting an updated error, but that was because of double quotes also. – Daniel Brownlow Nov 27 '12 at 18:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.