LinuxQuestions.org
Visit Jeremy's Blog.
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 12-05-2003, 07:06 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Rep: Reputation: 32
ServerAlias question


hi people

I'm working with virtual host stuff

I've got my DNS worked out with my host..

what i wish to know.

is the ServerAlias

does it have the www or can it be

ServerAlias mysite.com

here is my input

<VirtualHost *:80>
ServerAdmin webmaster@mysite.com
DocumentRoot /var/www/html/forums
ServerName forums.mysite.com
ServerAlias www.forums.mysite.com
ServerSignature off
DirectoryIndex index.html index.php index.htm
</VirtualHost>

any one help me out please...
 
Old 12-05-2003, 02:21 PM   #2
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
I'm not queit sure what you're trying to do, maybe give us a few more details. But simply making hostname aliases for your domain in Apache's conf isn't going to make that hostname resolve. What I mean by that is that if your registered your domain as mysite.com, and you want forums.mysite.com to resolve to you, then Apache's conf isn't going to make that happen. You'll need to adjust your DNS server's configuration to include any all hostnames you want to resolve for the domain. All resolve requests on your domain are/should be answered by one of your DNS nameservers, if those nameservers don't know where forums.mysite.com is, then they'll simply answer that they don't know. If you have control over the nameserver, this is easy to fix by just adding a CNAME or A record to the domain's configuration file.

Anyway, the ServerAlias directive in Apache is for making multiple hosnames point to the same website, which seems to be what you want, but keep in mind that it must first get to Apache before Apache can do that, as explained above. More info on that directive can be found on Apache's website.

http://httpd.apache.org/docs-2.0/mod...ml#serveralias
 
Old 12-05-2003, 07:26 PM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Hi mate my ISP host sets the DNS for me to have sub domains.

I'm not sure if i have mine install on linux, but then again i have been told it's not that easy to do...

I did get it going after all....Once my ISP added a A record to their DNS

does that sound right

EG: http://forums.rockinghamgateway.com/

what i was asking does it matter the way i type it in

as in with the www or with out the www.

ServerAlias rockinghamgateway.com

TT

 
Old 12-05-2003, 08:00 PM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Ah, ok..I see. Well, it's all resolving for me, just tried it. forums. gets me to your forum, www. gets me to your main page, as does just plain old rockinghamgateway.com. If this is not what you want, then yeah, play with the Apache conf to make it point each hostname to wherever you want. But as far as the virtualhost stuff goes, that more for hosting multiple websites on the same server. For instance, www.rockinghamgateway.com & www.someother.com.
 
  


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
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 05:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
Question 1 Firewall Log Question 2 Network Monitor Soulful93 Linux - Networking 4 08-05-2004 12:05 AM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 03:02 PM
Apache ServerAlias help Manuel-H Linux - General 1 04-19-2003 11:51 PM


All times are GMT -5. The time now is 04:23 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