You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Edwin <dd...@excite.com> on 2008/03/22 18:46:07 UTC

[users@httpd] Virtual Host problems

 People whom know more than me please inform me of what I'm doing wrong   &lt;VirtualHost *:80&gt;DocumentRoot C:/users/edwin j mcleod/documents/Apache Software Foundation/Apache2.2/htdocsServerName www.Example.com# Other directives here&lt;/VirtualHost&gt;&lt;VirtualHost *:80&gt;DocumentRoot C:/users/edwin j mcleod/documents/Apache Software Foundation/Apache2.2/htdocs2ServerName www.Example.com# Other directives here&lt;/VirtualHost&gt;  Syntax error on line 165 of c:/Users/Edwin J Mcleod/Documents/Apache Software Foundation/APache2.2/conf/httpd.conf:Documentroot takes one argument, Root directory of the document tree 

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

Re: [users@httpd] Virtual Host problems

Posted by Craig Huffstetler <cr...@gmail.com>.
Edwin,

Please stay in the same thread. It helps us keep up with what is going
on...and is courtesy on mailing lists.

Did you update the virtual-hosts.conf file, Edwin? I am just asking. The
error you received has nothing to do with that. What you pasted indicates
one error thus far. I am just getting one step ahead, because I would like
to know (because this will be the next error your receive). Again, I
referenced links for you. Did you read them?

I am referencing another below for Windows users that will help you on the
virtual-hosts.conf file and once again on this problem. This was a simple
syntax problem.

Moving along:

The DocumentRoot needs to be enclosed in quotation marks. Example:

DocumentRoot "C:/users/edwin j mcleod/documents/Apache Software
Foundation/Apache2.2/htdocs"

Please double check that the document root is completely correct (I.E. it is
COMPLETELY correct).
I highly recommend adding these two lines:

CustomLog logs/example.com.com.access.log combined
ErrorLog logs/example.com.error.log

To log errors to help us troubleshoot if you continue to get errors (also
this is just good, common practice most of the time if you have the space
and it is not a massive, massive site). Plus, this is a combined log file.
You can comment these lines out later on.

Restart the server (hard or soft) after you fix your syntax.

Again, a reference page:
http://johnbokma.com/windows/apache-virtual-hosts-xp.html

Read and be enlightened.

Sincerely,

Craig Huffstetler

On Sat, Mar 22, 2008 at 12:46 PM, Edwin <dd...@excite.com> wrote:

> People whom know more than me please inform me of what I'm doing wrong
>
>
>
> <VirtualHost *:80>
> DocumentRoot C:/users/edwin j mcleod/documents/Apache Software
> Foundation/Apache2.2/htdocs
> ServerName www.Example.com
> # Other directives here
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot C:/users/edwin j mcleod/documents/Apache Software
> Foundation/Apache2.2/htdocs2
> ServerName www.Example.com
> # Other directives here
>
> </VirtualHost>
>
>
>
> Syntax error on line 165 of c:/Users/Edwin J Mcleod/Documents/Apache
> Software Foundation/APache2.2/conf/httpd.conf:
> Documentroot takes one argument, Root directory of the document tree
>
>
>
> ------------------------------
> *Join Excite! - http://www.excite.com*
> The most personalized portal on the Web!

Re: [users@httpd] Virtual Host problems

Posted by j k <jo...@gmail.com>.
On Sat, Mar 22, 2008 at 9:46 AM, Edwin <dd...@excite.com> wrote:

> People whom know more than me please inform me of what I'm doing wrong
>
>
>
> <VirtualHost *:80>
> DocumentRoot C:/users/edwin j mcleod/documents/Apache Software
> Foundation/Apache2.2/htdocs
> ServerName www.Example.com
> # Other directives here
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot C:/users/edwin j mcleod/documents/Apache Software
> Foundation/Apache2.2/htdocs2
> ServerName www.Example.com
> # Other directives here
>
> </VirtualHost>
>
>
>
> Syntax error on line 165 of c:/Users/Edwin J Mcleod/Documents/Apache
> Software Foundation/APache2.2/conf/httpd.conf:
> Documentroot takes one argument, Root directory of the document tree
>
>
>
> ------------------------------
> **


There's th eproblem:
'Documentroot takes one argument, Root directory of the document tree'

Try quotes around that:
DocumentRoot "C:/users/edwin j mcleod/documents/Apache Software"


Neither windows nor unix/linux likes a space in a file name.
Good luck