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.

Hi,

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

Virtualmin > Server Configuration > DNS Records

-Peter

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?

“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. :slight_smile: You can safely ignore it.

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!

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.

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

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)

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.

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?

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

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

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

You’re welcome! :smiley:

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?

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?

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

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!

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.

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!

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:

[code];; 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.[/code]

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.