Apache configuration
I am trying to set up a virtual domain, my regular domain is- <snurckle.net>
virtual domain is- <scyllachat.com> (StarWarsGalaxies gaming site) I've got the <myvirtualdomain> working, no issues. But I'm trying to set up- forum.<.myvirtualdomain.>com to go to a different directory, however when I do- ServerName www or forum.scyllachat.com it only recognizes the first 'set' in the httpd.conf file. What is the proper way to point it to a different directory?? |
I'm not quite sure exactly what your setup is, but I usually do this with multiple virtusl hosts, so for example I would have:
Code:
<VirtualHost *> |
Quote:
<VirtualHost *> ServerName www.scyllachat.com ServerAdmin john@snurckle.net DocumentRoot /var/www/vhosts/scylla/html ErrorLog /var/log/httpd/scylla/error_log CustomLog /var/log/httpd/scylla/access_log common </VirtualHost> <VirtualHost *> ServerAdmin john@snurckle.net DocumentRoot /var/www/vhosts/scylla/html/forum ServerName forum.scyllachat.com ErrorLog /var/log/httpd/scylla/error_log_forum CustomLog /var/log/httpd/scylla/access_log_forum common </VirtualHost> As you can see, both virtualhost have the same domain name, but I'm trying to kick one of them (forum) to another DocumentRoot directory. Any ideas? |
In my example all of the virtual hosts use the example.com domain -- it looks to me like what you have in your post is correct and ought to work. If it's not, firstly make sure you haven't made any typos and make sure you don't have any conflicting ServerAlias directories somewhere else.. It looks like you're pointing to a forum so if it uses CGI scripts, make sure your ScriptAlias is set correctly. I know this works because I have miller.webjudge.net and hosting.webjudge.net running on the same server and this is how I have it set up.
|
Well, I haven't added the 'forum' yet, just an index.html file that basically says 'testing index.html' in it.
I'm wondering if I shouldn't make forum.xxx.com 'ip based' and not a 'name based' domain. I'd rather not do that, but when you go to forum.xxx.com it sends you to www.xxx.com, and not where I have the DocumentRoot pointing to. Perhaps this is a DNS problem. I can always change DNS to www and forum and make them two seperate DB's but it seems the way I have it set is correct. I really appreciate your help. |
All times are GMT -5. The time now is 11:26 PM. |