LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   DocumentRoot error message (https://www.linuxquestions.org/questions/linux-software-2/documentroot-error-message-46062/)

Thinkgeekness 02-18-2003 06:52 PM

DocumentRoot error message
 
I have Apache 1.3 (on RHL 7.3) and I am setting up name based virtual hosting and so far it looks like this:

ServerName domain.com
DocumentRoot /home/httpd/domain
BindAddress *

NameVirtualHost *

<VirtualHost *>
ServerName domain.com
DocumentRoot /home/httpd/domain
</VirtualHost>
<VirtualHost *>
ServerName domain2.com
DocumentRoot /home/httpd/domain2
</VirtualHost>

When I try to start apache, I get this error message:

DocumentRoot takes one Argument, Root directory of the document tree

How do I fix this?

Thanks

mcleodnine 02-18-2003 07:56 PM

Lokks to me like you're pointing to 'domain.com' twice. Once in the general setup and once in the VirtualHost.

Thinkgeekness 02-18-2003 08:11 PM

I just took the DocumentRoot off of the first virtual host (the main domain) and it still says it. In order for me to get so that it doesnt give me the error, I have to delete it on both of the virtual hosts. But then it wont know where to point domain2.com to.

Thinkgeekness 02-18-2003 08:59 PM

It is working, it turns out I need the " in front and end of the directory. Ex. DocumentRoot "/home/httpd/domain". But now I have ran into a different problem. For an example, if I have an about us on domain2, it goes to the about us on the main domain. But it shows the address as: http://domain2.com/aboutus. If I go to www.domain2.com/aboutus it goes to http://domain2.com/aboutus and the about us is the one for the main domain. If you have any questions about this or I didnt work it right, go ahead and ask. But any suggestions towards fixing this?


All times are GMT -5. The time now is 09:22 PM.