How to redirect ip to domain name inside site .... ???

13 posts / 0 new
Last post
#1 Tue, 01/28/2014 - 09:26
matuog

How to redirect ip to domain name inside site .... ???

M using Virtualmin on CentOS 6 32bit.

Suppose my domain name is 'abcdef.com' and my hosting ip address is 111.222.333.444 but I have little confusion with domain name, m explaining .... When I use abcdef.com or www.abcdef.com I get redirect to my hosting's index page but when I use '/directory/', I get ip address -- (describe below...)

if I use :- www.abcdef.com --(path display)-->> abcdef.com/index page ...... is OK but if I use :- www.abcdef.com/site/ --(path display)-->> 111.222.333.444/site/index page ...... not displaying "abcdef.com/site/index page".

Similarly if I put the mouse pointer over a link, inside my site, I get "111.222.333.444/site/index" instead of "www.abcdef.com/site/index", displaying as the path of the link.

Is this problem, related to domain section or hosting section or need proper configuration on Virtualmin??? If it related to Virtualmin, how do I rectify it ???

(I am a site designer and my partner, who is a webmaster and configuring this server, suddenly get very sick and hospitalize. So I get confuse .... please help from your end)

Thanks & Regards,

GOUTAM CHAKRABORTY

Adopt a sapling now .............

Be One of GREEN TEAM & Go Green !

Tue, 01/28/2014 - 10:01
Locutus

What web software do you have installed on the domain in question?

The web browser or web server will generally not replace a URL like "www.abcdef/site/" with an IP address, except you have an explicit redirect in the server in place. But if you had that, you'd know, and wouldn't need to ask this question. :) So my assumption is that the redirect is done in the web software that's installed at "site".

Tue, 01/28/2014 - 10:24 (Reply to #2)
matuog

Thanks for the reply but I have two section under 'public_html'

1- 'public_html/mysite/index page' = it is a simple website design in html and php

2- 'public_html/mynetwork/index page' = it is a social network script.

.... but both of the site react same, means if I use www.abcdef.com --(path display)-->> abcdef.com/index page

but if I use

www.abcdef.com/mysite/ --(path display)-->> 111.222.333.444/mysite/index page ...... instead of "abcdef.com/mysite/index page".

or

www.abcdef.com/mynetwork/ --(path display)-->> 111.222.333.444/mynetwork/index page ...... instead of "abcdef.com/mynetwork/index page".

I can accept it in second case (for files under 'public_html/mynetwork/...') but show the same in first case also (for files under 'public_html/mysite/...')

.... not only that in both sections if I put the mouse pointer over a link word, inside my site, I get "111.222.333.444/mysite or mynetwork/link word path" instead of "www.abcdef.com/mysite or mynetwork/link word path", displaying as the path of the link.

Tue, 01/28/2014 - 11:42
Locutus

That's why I asked what web software you have installed there... As I said, normally neither the browser nor Apache will modify the URL to contain the IP address. Either you have some mod_rewrite directives in the Apache config for that domain, or the installed web software does the URL rewrite.

You might want to check out that, i.e. the Apache virtual host directives for the domain in question, and any config files for the web software that's installed.

Wed, 01/29/2014 - 07:10 (Reply to #4)
matuog

Yes ... U r right ... I just uninstall and re-install the script and it's start working but getting another problem ....

Now when I use 'www.abcdef.com' it's working and redirecting to my site and it's following links too

but when I use 'abcdef.com' it's not working and say the following

In Opera = Hostname lookup for "abcdef.com" failed.

In chrome = Oops! Google Chrome could not find abcdef.com

but I just did uninstall and re-install the script, nothing else ...... any idea what to do ?? someone guide me that I required DNS entry for my naked domain is missing in the dns zone of my domain. Hence the naked domain is not resolving.

I have to add A records for naked domain in the dns zone post which my website will resolve without www.

Can U please guide me to do this in virtual server in my Virtualmin ???? PLEASE .......

anyway, really lots of thanks for the guide line and replies.

Thanks & Regards,

GOUTAM CHAKRABORTY

Adopt a sapling now .............

Be One of GREEN TEAM & Go Green !

Wed, 01/29/2014 - 18:47
matuog

Suppose my domain name is 'abcdef.com' and my shared server ip address is 111.222.333.444, I use ns1.abcdef.com and ns2.abcdef.com with my shared server ip in child nameservers.

Then set the nameservers of my domain to ns1.abcdef.com and ns2.abcdef.com, this way I use my private nameservers, and I am not using ISP's.

Then in vitualmin, I have to create the domain by go to Virtualmin > Server Configuration > DNS Records > Create Record of my choice.

Can someone PLEASE guide me, elaborately; step by step, what are the records from the followings, I need to create, and how, for my domain 'abcdef.com' and 'www.abcdef.com' in Virtualmin :-

A record - IPv4 address
AAAA record - IPv6 address
CNAME - Name Alias
NS - Name Server
MX - Mail Server
TXT - Text
PTR - Reverse Address

PLEASE HELP . . . . . . LOTS OF THANKS IN ADVANCE

----------------------------------------------------------
Thanks & Regards,

GOUTAM CHAKRABORTY
Adopt a sapling now .............
Be One of GREEN TEAM & Go Green !

Wed, 01/29/2014 - 08:55
Locutus

Virtualmin will in general automatically create the DNS zone for you with the proper records when you turn on the BIND feature, you don't need to add records manually.

Can you specify the problem you're seeing / what you're trying to accomplish, that would require you to manually create records?

Wed, 01/29/2014 - 09:36 (Reply to #7)
matuog

Suppose my domain name is 'abcdef.com' .....
Now when I use 'www.abcdef.com' it's working and redirecting into my site and site's following links too
but
when I use 'abcdef.com' it's not working and says the following
In Opera = Hostname lookup for "abcdef.com" failed.
In chrome = Oops! Google Chrome could not find abcdef.com
but I uninstall everything except a index.php page.

Someone guide me that I required DNS entry for my naked domain is missing in the dns zone of my domain. Hence the naked domain is not resolving. I have to add A records for naked domain in the dns zone post which my website will resolve without www.

Can U please guide me to do this in virtual server in my Virtualmin ???? PLEASE .......

anyway, really lots of thanks for the guide line and replies.

LOTS OF THANKS IN ADVANCE

----------------------------------------------------------
Thanks & Regards,

GOUTAM CHAKRABORTY
Adopt a sapling now .............
Be One of GREEN TEAM & Go Green !

Wed, 01/29/2014 - 10:43
Locutus

Normally Virtualmin creates the proper A records for both the "naked" domain name, and with "www." in front of it when it creates a zone. Finding out why it did not do so in your case could be a bit problematic to do remotely. I'd need to log in to your system directly to do some tests there.

You can fix the immediate problem though, adding the A record, under "Virtualmin -> Server Configuration -> DNS Records". Use "Record name: same as domain" and "IPv4 address: that of your server".

Wed, 01/29/2014 - 19:22 (Reply to #9)
matuog

@ Locutus ..... I will be happy if U kindly log in my server and reset it and help me to get all green (or blue) in "Site 1" or "Site 2" and make everything OK.

As I told that,
my partner is sick and hospitalize and m facing lots of problem with this server,
as m not a webmaster nor can do server configuration , m a site designer
But how do I assist U by my server user id and password; can I give U in this public forum ???

----------------------------------------------------------
Thanks & Regards,

GOUTAM CHAKRABORTY
Adopt a sapling now .............
Be One of GREEN TEAM & Go Green !

Thu, 01/30/2014 - 03:36
Locutus

Sure, I can gladly help you out. I suggest we get in contact via instant messenger for that. Please note that if it takes longer than about 30 minutes, I'll need to charge a moderate fee, to make a living. :) If that's okay, please tell me your screen name in an instant messenger of your choice (Jabber, Skype, ICQ, Trillian Astra, AIM, Windows Live).

Thu, 01/30/2014 - 08:02 (Reply to #11)
matuog

Thanks for the reply Locutus.

But, as U know, this job is our (me and my partner's) and unfortunately one of us is sick, so I am handling it alone but if U charge me for the job (which is natural) then I have to inform this to my higher authority as per 'rule of work' and also for payment.
But, in that case they will immediately remove us form the project because as per 'rule of work', we can take help and guideline form internet or others but if I pay U, then it's not anymore helping and become 'We are doing our job by paying others'; it not only remove us form our project but also may suspend us.

I thought U are going to help me for free, so I request U (please forgive me for the misunderstanding).

But if, any day any time my higher authority will decide to do it by paying others (means form external), I must refer them for U, with no late.

Again - lots of thanks for the helps and guidelines and sorry for the misunderstanding, hope U may understand my situation and forgive me.

----------------------------------------------------------
Thanks & Regards,

GOUTAM CHAKRABORTY
Adopt a sapling now .............
Be One of GREEN TEAM & Go Green !

Thu, 01/30/2014 - 08:17
Locutus

Yeah, I can help you for free up to a certain point - when it gets too complicated to do just via the forum, and/or when it takes too much time, I need to ask for a fee, since I need to earn a living and can only do so much during my free time. :)

Topic locked