Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Setting document root for just one domain?

    Hola,
    Sorry for this very basic question.
    I've created a virtualhost like this:
    Code:
    <VirtualHost *:80>
        ServerName domain.eu
        ServerAlias *.domain.eu
       
        DocumentRoot D:/Work/pbgit/project/web
        <Directory D:/Work/pbgit/project/web>
            Allow From All
            AllowOverride All
        </Directory>
       
          Alias /sf c:/users/zane/workspaces/aptana/pb//lib/vendor/symfony/data/web/sf
      <Directory "c:/users/zane/workspaces/aptana/pb//lib/vendor/symfony/data/web/sf">
        AllowOverride All
        Allow from All
      </Directory>
    
    </VirtualHost>
    This overwrites the default docroot, so I can't access anything on localhost, everything just redirects to the new VirtualHost's docroot. Obviously I want only one domain for that to happen. Is there a way to do this?
    When I try to create multiple VirtualHosts, everything just uses the docroot of the first one.
    I've searched the manual, but haven't really found a solution: http://httpd.apache.org/docs/1.3/vhosts/name-based.html
    Probably I have a wrong understanding of the concept of vhosts...
    Thanks

  • #2
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I got it working now.
    For a default, catch-all VirtualHost, it must be created without a ServerName.

    Also, the line NameVirtualHost *:80 must be present.


  •  

    Tags for this Thread

    Posting Permissions

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