Hello I need some help with apache and sub-domains. My server setup is very unique and I will try to describe it as best as I can. I am running freebsd 8.0 with the latest version of Apache 2. I have one user in a jail (kind of like a virtual server just a little different) and it is running the same software as the base system. I have one ip address on the server and was able to get both servers (The physical and the jail) working on separate domains. I have configured the dns for a subdomain (for the jail) but I can't get apache to work with it. Here is my current httpd-vhost.conf NameVirtualHost *:80 <VirtualHost www.crystalwebmail.com:80> ServerAdmin webmaster@crystalwebmail.com DocumentRoot /usr/local/www/site DirectoryIndex index.html index.php ServerName www.crystalwebmail.com Errorlog /var/log/www.crystalwebmail.com-error.log CustomLog /var/log/www.crystalwebmail.com-access.log common <Directory /usr/local/www/site> Order allow,deny AllowOverride None Allow from all Options -Indexes </Directory> Alias /trunk /usr/local/www/project/trunk <Directory /usr/local/www/project/trunk> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost forum.crystalwebmail.com:80> ServerName forum.crystalwebmail.com ServerAlias forum.* ServerAdmin webmaster@crystalwebmail.com DocumentRoot /usr/local/www/forum </VirtualHost> Code (markup): I am trying to get the forum.crystalwebmail.com to point to /usr/local/www/forum but all that happens is I get my original site. Any ideas? Thanks! -HD
This should work, however, have you tried changing the DocumentRoot of the sub-domain inside of the main domain i.e. move the forums inside the main site and change the DocumentRoot accordingly.
I just tried to take the URL "http://forum.crystalwebmail.com" in my browser and it came up nicely. So, I think the problem is resolved.
No that is my current domian. I am trying this a on test server and test domain. I want to keep the domain secret though because I have information about my new product on this server. @madaboutlinux that didn't seem to work.... . Any other ideas? Thanks! -HD