Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] DNS alias
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tdi
Apprentice
Apprentice


Joined: 25 Aug 2004
Posts: 170

PostPosted: Mon Apr 11, 2005 6:18 am    Post subject: [SOLVED] DNS alias Reply with quote

is it possible to set dns alias o sercer A pointing to webpage at server B ?

Last edited by tdi on Mon Apr 11, 2005 6:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
tukachinchila
Apprentice
Apprentice


Joined: 11 Mar 2005
Posts: 274
Location: Oregon

PostPosted: Mon Apr 11, 2005 7:58 am    Post subject: Reply with quote

I'm not sure I understand the question. Do you want to be able to enter in the address of one website locally, but have it redirect you to another site? Or are you trying to redirect remote users attempting to access your server, sending them to another server instead?

In the first case, you could probably just add an entry into /etc/hosts. In the second case, I think you'd want to set up NAT and port forwarding (this doc might help you: http://www.gentoo.org/doc/en/home-router-howto.xml#doc_chap6).
Back to top
View user's profile Send private message
fvant
Guru
Guru


Joined: 08 Jun 2003
Posts: 328
Location: Leiden, The Netherlands

PostPosted: Mon Apr 11, 2005 1:43 pm    Post subject: Reply with quote

If you want to redirect a webpage, use apache mod_alias, see http://httpd.apache.org/docs/mod/mod_alias.html
Back to top
View user's profile Send private message
tdi
Apprentice
Apprentice


Joined: 25 Aug 2004
Posts: 170

PostPosted: Mon Apr 11, 2005 5:58 pm    Post subject: Reply with quote

i want remote users to type foo.bar.com and be redirected to foo.bar.com.pl (foo.bar.com.pl is not on my server) for exapmle

Last edited by tdi on Mon Apr 11, 2005 6:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
rouben
Apprentice
Apprentice


Joined: 07 Feb 2005
Posts: 159
Location: Thornhill, ON, Canada

PostPosted: Mon Apr 11, 2005 6:02 pm    Post subject: Reply with quote

I don't know if anyone can propose a more elegant solution, but you could create a VirtualHost for foo.bar.com with the following configuration directive (using mod_alias):

Code:
Redirect permanent / http://foo.bar.com.pl/

This should do it, the only downside is that you need a VirtualHost definition. There might be a more elegant solution to this, however, I can't think of anything else ATM.
Back to top
View user's profile Send private message
tdi
Apprentice
Apprentice


Joined: 25 Aug 2004
Posts: 170

PostPosted: Mon Apr 11, 2005 6:10 pm    Post subject: Reply with quote

thanks... that was what i wanted to achieve... thank a lot
Back to top
View user's profile Send private message
rouben
Apprentice
Apprentice


Joined: 07 Feb 2005
Posts: 159
Location: Thornhill, ON, Canada

PostPosted: Mon Apr 11, 2005 6:17 pm    Post subject: Reply with quote

tdi wrote:
thanks... that was what i wanted to achieve... thank a lot

You're quite welcome. By the way, if you're feeling adventurous, you might also want to consider using mod_rewrite to achieve the same result without having to define a VirtualHost. It's not for the faint of heart, though. ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum