Results 1 to 9 of 9
I have a domain that I host myself on my webserver and I do my own DNS. It is a .net we will call it mydomain.net I also own mydomain.com. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-06-2004 #1
DNS Mydomin.com + .net
I have a domain that I host myself on my webserver and I do my own DNS. It is a .net we will call it mydomain.net I also own mydomain.com. Currently mydomain.com is doing nothing but I would like it to default to mydomain.net without using another IP address. I am not quite sure how to do this. I do host my own DNS so if that is a way of doing it I can do it I am just not sure how. Just to reiterate what I want is if you lookup www.mydomain.com or www.mydomain.net it will go to my www.mydomain.net website.
Any Ideas?
Thanks,
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
- 12-07-2004 #2Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
You can't do this through DNS. However, you don't really want to. If you are just looking at doing webserving for both domains from the same folder, edit your httpd.conf, and add a ServerAlias directive. It would read:
Where your ServerName is mydomain.net. Then you can make your DNS point both zones to the same IP, and apache will figure out which domain is which by the HTTP headers it sends.Code:ServerAlias www.mydomain.net mydomain.com www.mydomain.com
Best,
SamuelI respectfully decline the invitation to join your delusion.
- 12-07-2004 #3
Do I still need to do a zone and forward and reverse lookup for the .com or can I just edit the httpd.conf file?
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
- 12-07-2004 #4Linux Newbie
- Join Date
- Apr 2004
- Posts
- 158
Hi,
You can do this via DNS,
All you need is a CNAME to www.mydomain.com from www.mydomain.net
That would make any person trying to surf to www.mydomain.com end up at www.mydomain.net's ip-address (depending on your apache config, you could run separete web-sites or one site as described above)
That is if your DNS is serving the internet.
If you need some DNS hosting look at www.no-ip.com.
look at Virtual hosting on the www.apache.org site for more information about running multiple web-sites on the same server.
Cheers
Jonas--
in Linux Computing we Trust
- 12-07-2004 #5My DNS is serving the internet. Can you be a little more specific about the cname?
Originally Posted by cjl7
Do I need a zone file for www.mydomain.com and a forward reverse lookup.?
or can I do like wassi said and alias it in the httpd.conf file and be done with it?
thanks
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
- 12-07-2004 #6Linux Newbie
- Join Date
- Apr 2004
- Posts
- 158
Hi,
No it is now enough to edit the httpd.conf file, people (like me) needs to be able to find out where www.mydomain.com is -> DNS lookup...
In your main file for www.mydomain.net you have an alias for www, ftp and so on, right?
In there you put the following;
www.mydomain.com IN CNAME www.mydomain.com
This assumes that www.mydomain.com is something that your DNS knows about.
Reload the DNS and check withLet me know if anything is unclear!Code:host www.mydomain.com
//jonas--
in Linux Computing we Trust
- 12-07-2004 #7I will try this and let you know.
Originally Posted by cjl7
Thanks for the advice.
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
- 12-07-2004 #8
Jonas,
That didn't work, I was a little unclear about your cname deal
www.mydomain.com in cname www.mydomain.com
I tried it both ways
www.mydomain.net in cname www.mydomain.com
www.mydomain.com in cname www.mydomain.com
neither worked.
Do i need to create a zone too and if I do it your way what do I do about reverse lookups?
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
- 12-07-2004 #9
Jonas,
I created a zone file and it worked. I also copied my .net db file to .com so I have to db files one for .net and one for .com but the .com looks exactly like the .net and it worked. Thanks for your advice.
Cheers,
MikeSome people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds


Reply With Quote
