LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2004, 09:35 PM   #1
snurckle
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
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??
 
Old 07-25-2004, 10:04 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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 *>
  ServerName something1.example.com
  ServerAlias something2.example.com
  DocumentRoot /www/htdocs/example/adir
  # -- other stuff -- #
</VirtualHost>

<VirtualHost *>
  ServerName something3.example.com
  ServerAlias something4.example.com
  DocumentRoot /www/htdocs/example/anotherdir
  # -- other stuff -- #
</VirtualHost>
This makes something1.example.com and something2.example.com point to adir as the document root and something3 and something4 point anotherdir. Hopefully this is something like what you're trying to do...
 
Old 07-25-2004, 10:34 PM   #3
snurckle
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by btmiller
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 *>
  ServerName something1.example.com
  ServerAlias something2.example.com
  DocumentRoot /www/htdocs/example/adir
  # -- other stuff -- #
</VirtualHost>

<VirtualHost *>
  ServerName something3.example.com
  ServerAlias something4.example.com
  DocumentRoot /www/htdocs/example/anotherdir
  # -- other stuff -- #
</VirtualHost>
This makes something1.example.com and something2.example.com point to adir as the document root and something3 and something4 point anotherdir. Hopefully this is something like what you're trying to do...
Thanks, but I think I'm trying to do something a little different than this.

<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?
 
Old 07-25-2004, 11:00 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
 
Old 07-25-2004, 11:06 PM   #5
snurckle
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache configuration BoardinBum Linux - Networking 3 12-29-2004 06:53 AM
Apache Configuration dramous Linux - Newbie 5 09-27-2004 03:46 PM
apache configuration? jcsg Linux - Newbie 1 06-21-2004 08:08 AM
Apache configuration? sikandar Linux - Software 2 10-21-2003 01:54 PM
Apache configuration arraman Linux - Software 1 07-19-2001 01:56 AM


All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration