Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Space in DocumentRoot folder name

I installed apache2 on ubuntu, I changed the DocumentRoot value to my work folder. my folder path is /home/user/My\ Works/sites so I changed my DocumentRoot to :

DocumentRoot /home/user/My\ Works/sites

but when I reload the apache I get this error:

Syntax error on line 4 of /etc/apache2/sites-enabled/mysite.conf: DocumentRoot takes one argument, Root directory of the document tree Action 'configtest' failed. The Apache error log may have more information. ...fail!

What should I do if I have space in my folder name?

like image 320
MajAfy Avatar asked Dec 16 '13 15:12

MajAfy


1 Answers

Simply quote the path:

DocumentRoot "/home/user/My Works/sites"
like image 131
mata Avatar answered Sep 23 '22 00:09

mata