|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi guys...
i am a newbie in DNS... I ve a RedHat 8 Linux Apache Web Server with a domain (abc.com). Now I have made another registration with a domain named (itssandip.tk). Now if I want to host that domain in my existing web server with abc.com domain how should I proceed. Should I made itssandip.tk Virtual. If yes please help me how??? Thanks for support Last edited by sandipguha : January 22nd, 2004 at 02:03 AM. |
|
#2
|
|||
|
|||
|
Same Site?
Do you want both domains to display the same site?
You should be able to just make another record using the other domain instead. If you want different sites then you need to ask about setting up apache for Name Base Hosting. You would still setup DNS for both domains to resolve to your IP. In apaches http.conf it has at the end an example and a url for the manual on how to setup <virtual host> Directives </virtual host> If thats what you need I can help you out if you need some explaining or something. |
|
#3
|
|||
|
|||
|
Thanks a lot for ur early reply Trininox...
I don't want to display the same website by both that address. I made that that entry in the Virtual Host section of Apache's httpd.conf file. But it is not showing the the second one. May be I'm mistaking something.... It will be a great help if u guide me the entire procedure..... Thanx in advance... |
|
#4
|
|||
|
|||
|
Copy the virutal host section of you conf so i can see how you have it set.
This is the page that you can read all about Named based hosting http://httpd.apache.org/docs-2.0/vhosts/name-based.html Make sure your globally you have the following set. Uncomment #LoadModule vhost_alias_module modules/mod_vhost_alias.so Make sure the following is set to Off UseCanonicalName Off Example of Virtual Host section NameVirtualHost *:80 <VirtualHost *:80> ServerName www.abc.com DocumentRoot /www/domain </VirtualHost> <VirtualHost *:80> ServerName www.itssandip.tk DocumentRoot /www/otherdomain </VirtualHost> Instead of * you can specify the real IP, and the port :80 isnt required. The document root is Linux style, you need to enter the absolute location of the folder on windows c:\apache\htdocs I think that should be all you need to make it work |
|
#5
|
|||
|
|||
|
<QUOTE>
NameVirtualHost *:80 <VirtualHost *:80> ServerName www.abc.com DocumentRoot /www/domain </VirtualHost> <VirtualHost *:80> ServerName www.itssandip.tk DocumentRoot /www/otherdomain </VirtualHost> thanks again... I'm using the ip address in NameVirtualHost NameVirtualHost <ipaddress>:80 But in the VirtualHost section I'm using like following: <VirtualHost www.abc.com> ServerName www.abc.com DocumentRoot /usr/local/apache2/htdocs/abc </VirtualHost> <VirtualHost www.itssandip.tk> ServerName www.itssandip.tk DocumentRoot /usr/local/apache2/htdocs/itssandip </VirtualHost> Is this right...?? if yes then all the settings are OK in httpd.conf file. What else should I do .. I mean anything to do with /etc/named.conf file and files in /var/named directory ???? Waiting for ur early reply.. |
|
#6
|
|||
|
|||
|
your <virtual host ###> need to be set to the same thing as
NameVirtualHost NameVirtualHost ### <VirtualHost ###> ServerName www.abc.com DocumentRoot /usr/local/apache2/htdocs/abc </VirtualHost> <VirtualHost ###> ServerName www.itssandip.tk DocumentRoot /usr/local/apache2/htdocs/itssandip </VirtualHost> That should be all you need to do. Once your domains are set to resolve to the same IP apache should handle the rest. Let me know if it works out for you. |
|
#7
|
|||
|
|||
|
Thanks..
If I ve understood u then I have to use IP Addess in both places.. But the IP address of both the domain is same lets say 192.168.1.100... will it not be a problem....the entire thing would look like.. NameVirtualHost 192.168.1.100 <VirtualHost 192.168.1.100> ServerName www.abc.com DocumentRoot /www/domain </VirtualHost> <VirtualHost 192.168.1.100> ServerName www.itssandip.tk DocumentRoot /www/otherdomain </VirtualHost> |
|
#8
|
|||
|
|||
|
Its supposed to be the same because your setting up two different domains for the same IP, so you specifiy the IP, then in each virtual host you setup you tell it the domain and the location of the documentroot
|
|
#9
|
|||
|
|||
|
Thanks again...
As you have suggested I did the same thing.. But while I'm entering www.itssandip.tk it showing that --- www.itssandip.tk could not be found. Please check the name and try again I think I ashould write some extra line in /etc/named.conf file for that domain ( itssandip.tk ) and also need something to change in /var/named folder. If yes then pls tell me what should I write.... Thanks |
|
#10
|
|||
|
|||
|
That would be about DNS which isnt my speciality. I would assume that if you copy the information about your other day and change of course the domain to the new one you should be able to get your new domain to resolve.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > DNS > 2 Domains and 1 Web Server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|