LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ServerAlias question (https://www.linuxquestions.org/questions/linux-newbie-8/serveralias-question-122914/)

tommytomato 12-05-2003 07:06 AM

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...:study:

DaHammer 12-05-2003 02:21 PM

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

tommytomato 12-05-2003 07:26 PM

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 :confused:

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 :newbie:

:Pengy:

DaHammer 12-05-2003 08:00 PM

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.


All times are GMT -5. The time now is 05:43 AM.