Results 1 to 8 of 8

Thread: DocumentRoot takes one argument!

  1. #1

    Thread Starter
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    DocumentRoot takes one argument!

    I followed this tutorial regarding adding a subdomain in DNS server http://content.websitegear.com/artic...main_setup.htm and configure the httpd.conf and add this line:
    Listen 80
    NameVirtualHost *

    <VirtualHost *>
    ServerName www.domain.com
    DocumentRoot c:/Program Files/Apache Group/Apache2/htdocs
    </VirtualHost>

    <VirtualHost *>
    ServerName subdomain.domain.com
    DocumentRoot c:/Program Files/Apache Group/Apache2/htdocs/marvin
    </VirtualHost>
    But when I restart the web server it throw an exception in line DocumentRoot: DocumentRoot takes one argument Root Directory in document tree.

    Any inputs are greatly appreciated.

    Thanks in advance.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: DocumentRoot takes one argument!

    You have a space in your pathname, so it needs quotes around it. Apache configuration files use spaces as argument separators.

    Code:
    DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

  3. #3

    Thread Starter
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: DocumentRoot takes one argument!

    Pen one more thing. I would like to ask something about setting up a subdomain coz I believe you have knowledge about this thingy bec. you have webhosting business and VisualAd too bec. I believe he's the one setting up his site which adam.codedev.com(sorry I forgot the right address).

    This is the scenario.
    Our company has a site www.ourcompany.net and it was created in our server(windows 2003) and they install DNS server for setting up a domain.Our company website running under IIS.
    My question goes how can I configure the DNS server to add a subdomain and when someone access that address i.e http://mydomain.ourcompany.net it will route to my PC(client pc) and what configuration should I do coz my site is running up under Apache while the main server running up under IIS.

    Thanks in advance mate.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: DocumentRoot takes one argument!

    You are going to have a tough time running two web servers side by side. Are they going to be on the same physical machine?

  5. #5

    Thread Starter
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: DocumentRoot takes one argument!

    No. Our server is on the other machine and I want our server to route to my pc when someone access to the specified address mydomain.ourcompany.net

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: DocumentRoot takes one argument!

    Mmkay. You can map a subdomain to a different IP. I guess however these machines are both going to be behind the same router?

  7. #7

    Thread Starter
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: DocumentRoot takes one argument!

    Don't know what you mean sorry I'm not a network guy but I guess they're in the same router and I don't know how to map a subdomain to a different IP.

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: DocumentRoot takes one argument!

    OK, doesn't matter. From what I can guess you would have the router set up to forward HTTP traffic to the main server running IIS. What you then need to do is, using IIS, redirect traffic on your subdomain to your Apache server. I know how to do this using Apache but I am not terribly certain how you would go about it using IIS. As far as I can tell, you need to set up the subdomain as a separate IIS website, the redirection itself I do not know. You can specify website content to come from a share, so you might be able to set up a network share from your Apache server.

    Or if you are familiar with Apache's mod_rewrite, you might want to look at ISAPI_Rewrite which is supposed to do the same thing for IIS, which might work.

    Sorry I can't be of more assistance but I am not very familiar with IIS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width