pointing to website not in this server

26 posts / 0 new
Last post
#1 Tue, 11/20/2012 - 15:14
edwardsmarkf

pointing to website not in this server

hello all - this has me stumped:

i wish to create a domain name but the website itself is currently not on my server.

in other words, say i have the domain ThisDomainLivesOnAnotherServer.com - and i wish to have the "A" record pointed to my old server.

how do i create this entry using virtualmin/webmin with just the "A" record and maybe the "MX" record, and not the website itself? it does not appear that "create virtual server" is where i would start.

Tue, 11/20/2012 - 15:20
tpnsolutions
tpnsolutions's picture

Hi,

Just add the domain with "Setup DNS zone" feature enabled, then create the records by going to:

Virtualmin > Server Configuration > DNS Records

-Peter

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Tue, 11/20/2012 - 15:43
edwardsmarkf

thanks peter!

would I add the domain using "Create Virtual Server", or do i start some place else?

i am assuming i would not see any new directory under /home - is this true?

Tue, 11/20/2012 - 16:15
Locutus

"Create Virtual Server" is the right place to go, yep. Among the features to enable, select "DNS Domain" only. Yes, it will create a user and home directory and all, that's how Virtualmin works. :) You can safely ignore it.

Tue, 11/20/2012 - 16:38
edwardsmarkf

hmmm well then - here is what i need to do:

i have almost 100 domain names on another server that will soon be migrated over to my new server, running virtualmin.

those 100 domain names are really all "alias" of one master domain, using multiUser-wordpress.

what i want to do is to create those 100 domain names somewhere in virtualmin on the NEW server, but have all of them point back to the current "A" record (for now).

then when the migration is complete, change all 100 domain names to the new server as an alias, just like it is now.

it sounds as if i will be creating 100 virtual servers, then deleting them, and recreating them all as an alias? perhaps there is an easier way?

THANK YOU ALL SO MUCH FOR YOUR HELP AND CONSIDERATION!

Tue, 11/20/2012 - 16:44
Locutus

Do you have Virtualmin Pro? There's a "Batch Create Servers" feature available there. In Virtualmin GPL, you'll probably have to create those 100 servers manually.

You can use the command line interface (command "virtualmin" in a shell) though which can be used to automate stuff too.

To add the A record to all those zones simultaneously, once the servers are created, you can use Webmin's BIND module, namely the "Add Records to Selected" button, after selecting the checkbox on all zones in question.

If all those 100 servers are now, and will be, supposed to point to the same IP and directory and stuff, you can create them as Alias servers already now.

Wed, 11/21/2012 - 02:11
tpnsolutions
tpnsolutions's picture

Hi,

Alternatively, if you are using GPL, while still manual as indicated by Locutus, you could write a simple shell script invoking the Virtualmin API which may be less time consuming then going through the GUI for such a task.

Ex.

#!/bin/sh

# create domain(s)
virtualmin create-domain --domain domain1.com --user user1 --pass pass1  --dns
virtualmin create-domain --domain domain2.com --user user2 --pass pass2  --dns

# remove A  records
virtualmin modify-dns --domain domain1.com --remove-record "domain1.com A"
virtualmin modify-dns --domain domain1.com --remove-record "domain2.com A"

# add A records
virtualmin modify-dns --domain domain1.com --add-record "domain1.com A 1.2.3.4"
virtualmin modify-dns --domain domain2.com --add-record "domain2.com A 1.2.3.4"

*** the above will give you an idea of what could be done, and may include errors so be sure to check over the syntax before using the above solution ***

-Peter

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Sun, 11/25/2012 - 17:16
edwardsmarkf

one more q - i see something that looks like this (attached)

Network interface . . . .O Shared, on IP 69.10.48.24
. . . . . . . . . . . . . . . . . . . . O Virtual with IP ________ O Already active

if i wish to "redirect" this new virtual-server to a different IP address entirely, do i change this "Network interface" to "Virtual with IP" and enter another servers IP ??

(somehow the question seems obvious, but this is the help-for-newbies forum, and i would not want to risk loosing my newbie status quite yet)

Sun, 11/25/2012 - 18:50
Locutus

Yep, that's right. I wouldn't call it "redirect" though, but rather just the "IP assignment" of your new Virtual Server. It'll influence which IP is used in the Apache directives and DNS zone files.

If the IP is already assigned to the ethernet card of your server, you need to check "Already active" too, othewise Virtualmin will add the IP to the card.

Sun, 11/25/2012 - 18:59
edwardsmarkf

awww DARN - I tried it and got this nasty error:

"Failed to create virtual server : No interface for the IP address 208.131.xxx.xxx exists"

any idea what might cause this?

Sun, 11/25/2012 - 20:09 (Reply to #10)
tpnsolutions
tpnsolutions's picture

Hi,

To use the "Already Active" option, the IP address must already be assigned and setup for the machine. If not, it is "not already active".

-Peter

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 11/26/2012 - 09:58
edwardsmarkf

imagine my surprise to find out that - - IT WORKS....!

a special thanks to tpnsolutions and Locutus for being patient with the newbie....

Mon, 11/26/2012 - 10:06
Locutus

You're welcome! :D

Mon, 11/26/2012 - 18:08
edwardsmarkf

well, one more MINOR setback/issue (or opportunity):

i have a virtual-server domain-name that points to another "A" record (see below) - but when i put that domain-name into any browser, the webpage of my virtualmin/webmin host account comes up instead.

oddly, the "alias" domain names are working fine.

in other words, i installed virtualmin-webmin on an account named edwardsmarkf.com - and i created a virtual-server called MarksNewWebsite.com - and i pointed the "A" record elsewhere. it seems to be ignoring the new "A" record.

i did go into serverConfiguration-->DNSRecords, and clicked the ManuallyEditRecords button, and did a copy/paste here:

$ttl 38400 @ IN SOA ns1.edwardsmarkf.com. root.ns1.edwardsmarkf.com. ( 1353895642 10800 3600 604800 38400 ) @ IN NS ns1.edwardsmarkf.com. marksnewwebsite.com. IN A 208.131.145.150 www.marksnewwebsite.com. IN A 208.131.145.150 ftp.marksnewwebsite.com. IN A 208.131.145.150 m.marksnewwebsite.com. IN A 208.131.145.150 localhost.marksnewwebsite.com. IN A 127.0.0.1 marksnewwebsite.com. IN TXT "v=spf1 a mx a:marksnewwebsite.com ip4:69.10.48.25 ip4:208.131.145.150 ?all"

i take it this works for alias virtual-servers but not necessarily for a real one?

Mon, 11/26/2012 - 21:42
edwardsmarkf

well, one more MINOR setback/issue - (or opportunity):

i have a virtual-server domain-name that points to another "A" record (see below) - but when i put that domain-name into any browser, the webpage of my virtualmin/webmin host account comes up instead.

oddly, the "alias" domain names are working fine.

in other words, i installed virtualmin-webmin on an account named edwardsmarkf.com - and i created a virtual-server called MarksNewWebsite.com - and i pointed the "A" record elsewhere. it seems to be ignoring the new "A" record.

i did go into serverConfiguration-->DNSRecords, and clicked the ManuallyEditRecords button, and did a copy/paste in the file attachment "dnsrecord.txt"

i take it this works for alias virtual-servers but not necessarily for a real one?

Mon, 11/26/2012 - 23:02
andreychek

Howdy,

It should be no problem to change the 'A' record.

Two things you may be running into there --

If the DNS record is cached in your ISP's DNS, you might need to wait a day or so for that cache to clear.

Or, it's possible that for some reason, it's not applying the configuration... you could always try manually restarting BIND on your Virtualmin server to see if that makes a difference.

-Eric

Mon, 11/26/2012 - 23:23
edwardsmarkf

hello andreychek -

when i go into my namecheap account and point from my current server (208.131.151.50) to my new server hosting virtualmin (69.10.48.25), the change takes place almost instantly, surprisingly.

i rebooted the server too, just to see if restarting dns/bind would help, but no go.

On my "Virtual Server Summary" page i see this:

IP address 208.131.145.150 (Private to this server)

is that a clue? i wonder what "private to this server" means?

i did include a screenshot of both the main virtual-server and the alias, if that helps at all!

andreychek - in a post of a couple of years ago, you mentioned being "worked like a dog" - but most dogs i know are quite lazy!

Tue, 11/27/2012 - 04:48
Locutus

I just tried to resolve "marksnewwebsite.com", but it seems that domain is not registered, or rather not known at the .com gtld-server. You might want to double-check this at your domain name registrar.

Tue, 11/27/2012 - 11:57 (Reply to #18)
edwardsmarkf

Locutus - my apologies - i just made that name up as an example.

fortunately, namecheap.com seems to change FAST so this is easy enough to test.

the webhost-account where i have virtualmin-webmin installed is at edwardsmarkf.com and the virtual-server account is comptonpesltrainers.com

please note that hollywoodaccent.com is an "alias" of comptonpesltrainers.com and works correctly.

edwardsmarkf.com is at IP ## 69.10.48.25

comptonpesltrainers.com website lives at IP ## 208.131.145.150

hollywoodaccent.com website lives at IP ## 208.131.145.150

any suggestions are appreciated!

Tue, 11/27/2012 - 13:27
Locutus

Something seems to be seriously wrong with the zone file where "comptonpesltrainers.com" is defined. When I query the name directly, I get "69.10.48.25" as result. When I try to dig-trace it, dig throws error messages I have never seen before:

;; Truncated, retrying in TCP mode.
;; communications error to 208.64.122.242#53: connection reset
;; communications error to 208.64.122.242#53: connection reset
;; communications error to 208.64.122.242#53: connection reset
;; connection timed out; no servers could be reached
 
;; Truncated, retrying in TCP mode.
;; communications error to 208.64.122.242#53: connection reset
;; communications error to 208.64.122.242#53: connection reset
comptonpesltrainers.com. 1800   IN      A       69.10.48.25
;; Received 57 bytes from 66.90.82.194#53(dns1.registrar-servers.com) in 244 ms
 
\cvs\9_3_x\lib\isc\mem.c:877: INSIST(ctx->stats[i].gets == 0U) failed.
 
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Can you paste the zone file where that domain is listed please? Please embed the paste in [code][/code] tags, so linebreaks and fixed-width font survives.

Tue, 11/27/2012 - 14:49
edwardsmarkf

Locutus - thank you for helping me!

here is what i believe you are asking for:

$ttl 38400
@   IN  SOA ns1.edwardsmarkf.com. root.ns1.edwardsmarkf.com. (
            1353895642
            10800
            3600
            604800
            38400 )
@   IN  NS  ns1.edwardsmarkf.com.
comptonpesltrainers.com.    IN  A   208.131.145.150
www.comptonpesltrainers.com.    IN  A   208.131.145.150
ftp.comptonpesltrainers.com.    IN  A   208.131.145.150
m.comptonpesltrainers.com.  IN  A   208.131.145.150
localhost.comptonpesltrainers.com.  IN  A   127.0.0.1
comptonpesltrainers.com.    IN  TXT "v=spf1 a mx a:comptonpesltrainers.com ip4:69.10.48.25 ip4:208.131.145.150 ?all"

if this is not what you are asking for, please let me know where else to look.

Tue, 11/27/2012 - 15:00
Locutus

The zone looks okay, but according to into-dns.com, the responsible nameservers for "comptonpesltrainers.com" are as follows:

dns1.registrar-servers.com  ['69.16.244.25', '38.101.213.194', '66.90.82.194', '50.7.230.26', '68.233.250.45']   [TTL=1800] 
 dns2.registrar-servers.com  ['208.64.122.242', '208.64.122.244']   [TTL=1800] 
 dns4.registrar-servers.com  ['184.171.163.91', '37.58.77.234', '173.236.55.99', '50.23.83.48', '184.173.147.66']   [TTL=1800] 
 dns3.registrar-servers.com  ['67.228.228.216', '188.138.96.213', '184.173.112.216', '204.45.254.2', '173.224.125.12']   [TTL=1800] 
 dns5.registrar-servers.com  ['72.20.38.137', '69.160.33.75', '122.248.253.64', '95.211.9.35', '213.229.119.229']   [TTL=1800]

So it seems you haven't correctly configured the domain at your registrar. The responsible nameserver should be a name that resolves to your IP address.

Wed, 11/28/2012 - 12:42
edwardsmarkf

hmm the saga continues....

i decided to obtain a "play" domain name so as not not cause issues with the live one.

the play domain is named ComptonPeslTrainers.info and has the "A" record pointed to 69.10.48.25

then i created a virtual-server and pointed it to 208.131.145.150 (please see attached)

but notice the results - the zone record and "dig" does not seem to agree, and this was after restarting my server!

ideas?

zone record:

$ttl 38400
@   IN  SOA ns1.edwardsmarkf.com. root.ns1.edwardsmarkf.com. (
            1354126856
            10800
            3600
            604800
            38400 )
@   IN  NS  ns1.edwardsmarkf.com.
comptonpesltrainers.info.   IN  A   208.131.145.150
www.comptonpesltrainers.info.   IN  A   208.131.145.150
ftp.comptonpesltrainers.info.   IN  A   208.131.145.150
m.comptonpesltrainers.info. IN  A   208.131.145.150
localhost.comptonpesltrainers.info. IN  A   127.0.0.1
comptonpesltrainers.info.   IN  TXT "v=spf1 a mx a:comptonpesltrainers.info ip4:69.10.48.25 ip4:208.131.145.150 ?all"

dig results:

[root@server ~]# dig    comptonpesltrainers.info
 
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.4 <<>> comptonpesltrainers.info
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41801
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
 
;; QUESTION SECTION:
;comptonpesltrainers.info.      IN      A
 
;; ANSWER SECTION:
comptonpesltrainers.info. 1084  IN      A       69.10.48.25
 
;; Query time: 8 msec
;; SERVER: 66.45.228.250#53(66.45.228.250)
;; WHEN: Wed Nov 28 11:21:53 2012
;; MSG SIZE  rcvd: 58

THANK YOU ALL FOR HELPING!

Wed, 11/28/2012 - 13:31
edwardsmarkf

thought - the problem might be that the domain-name registrar Namecheap.com had its "A" record pointing 69.10.48.25 - so i just changed it to point to the nameserver instead.

in other words, Namecheap.com and the virtualmin-webmin previously didnt agree on the nameserver value.

lets hope (and pray) this was the problem all along......

Wed, 11/28/2012 - 14:40
Locutus

If you wish to host the zone at your server, you need to configure the NS records at the registrar, not the A record. Right now, the NS records still point to the values I previously posted.

Thu, 11/29/2012 - 10:27
edwardsmarkf

thank you very much Locutus - that fixed it!

bonus - the vanity-nameservers are all working too!

Topic locked