denycall
By:
denycall

DocumentRoot does not exist problem

November 23, 2014 2.9k views

AH00112: Warning: DocumentRoot [/var/www/mydomain.tk/webroot] does not exist

what does this mean and how can I fix it?
Thank you.

1 Answer

It means that you have a VirtualHost with its DocumentRoot set to /var/www/mydomain.tk/webroot, but that directory does not exist. You would simply have to create the directory to fix it:

sudo mkdir /var/www/mydomain.tk/webroot
  • I tried it but it says;

    mkdir: cannot create directory ‘/var/www/mydomain.tk/webroot’: No such file or directory

  • Oh, /var/www/mydomain.tk does not exist either so you'll have to create it first:

    sudo mkdir /var/www/mydomain.tk
    sudo mkdir /var/www/mydomain.tk/webroot
    

    You can also pass the -p option to mkdir that creates all missing directories:

    sudo mkdir -p /var/www/mydomain.tk/webroot
    
Have another answer? Share your knowledge.