Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-08-2012, 06:09 PM   PM User | #1
poisonborz
New to the CF scene

 
Join Date: Mar 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
poisonborz is an unknown quantity at this point
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
poisonborz is offline   Reply With Quote
Old 02-08-2012, 08:33 PM   PM User | #2
poisonborz
New to the CF scene

 
Join Date: Mar 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
poisonborz is an unknown quantity at this point
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.
poisonborz is offline   Reply With Quote
Reply

Bookmarks

Tags
apache

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:37 AM.


Advertisement
Log in to turn off these ads.