Website-Redirect to public_html only for a single VServer ?!

I am trying to host without Domains / DNS pointers.
I Disabled BIND and all DNS- and Mailservices even in the RC conf as starting processes.

Access to public_html without Virtualmin-Login (Preview) is neccessary.

I’ve read “Access virtual server without domain name”

but couldn’t find “Virtual server creation” section.

I’ve read “url to access preview website”

and created 2 Redirects for 2 Vservers as described:

/domainA.tld --> /home/domainA/public_html

/domainB.tld --> /home/domainB/public_html

But that behaves strange:

  • Doesn’t work for Redirects called like the VServer ( /domainA )
  • Subdirectories are always includes even if disabled.
  • Only one Redirect works - the first that’s been created.

I think that the first created (or the single available) owns the Servers Redirect-Rights AND local IP, because it is directed to the according public_html ( http://serverIP/ from LAN).

I haven’t tried to work with Vmin in WAN yet as follow up…

Is there a possibility to Redirect multiple Vservers anyhow???
Without DNS Records of course… and preferred also without multiple IP’s.


Vmin & Webmin 3.82.gpl
Debian Lenny

Well, for Virtualmin to be able to serve any website, an externally resolvable hostname of SOME kind is necessary. :slight_smile: Can you please give more details as to how you set up your domains so far? What is the domain that has external DNS entries, and where do you wish to serve them from?

First of all, i’d like to serve them locally - no editable DNS, only serveral /etc/hosts.
Meaning there are no Domains served, access via IP. That’s the problem i need to solve.

Running services:
Apache, Proftpd, MySQL, PostgreSQL. Tomcat planned - there’s no module available for, right?

Thanks for your reply!

Sorries, I don’t have time right now to get into details about this kind of forwarding / redirects, but I can suggest some read from the Apache documentation (since you’ll quite probably have to manually configure stuff there if you wish to serve multiple sites without domain names etc.).

My suggestion though would be to set up the domains the “intended” way, possibly with a local-only domain like “.lan” or “.local”, and then configuring the machines you wish to test it from to use the Virtualmin host as nameserver. That will probably save you quite some hassle.

Thanks for your ideas, i’ll verify them for practicability but they’re actually all sympatic…
I’ll report.

In one case, i had the problem that the automatically dynamic IP updating process of the routing device only refers to the 1st 2 a-Records: “@” and “www”.

Every other A-Record has NOT BEEN UPDATED!


  • for every create a Cron-Job as root (Vmin-HowTo)
  • i let them run every minute at hours 23,0,1,2,3,4,5 every day, month and year.
  • as command insert the following:

wget -O - --http-user=YOUR-ZE-USERNAME --http-passwd=YOUR-ZE-PASSWORD ‘

(as before, vhostX and have to be replaced by your TLD / vhost- & A-Record-Name.)

Access to the Vhosts only works by having a DNS (DomainNameServer),
but not as it would be comfortable for testing by redirects from the Server’s IP as e.g.
-> this only works with lot’s of time and modification of apache’s vhost files.

There are 2 ways to gain the working testserver: (1)with or (2)without a domain you bought before and use!!!
The keyword ist DynDNS with !!! wildcard !!! support. Your server will be reachable from WAN.

The following is all at your own risk, if you do one of the described actions/ howto’s :wink:

1.) If you have (or bought) a domain for the Testserver - e.g.

  • create an account at, create a zone, modify

  • as NS-Records choose 2 different Nameservers (default,

  • as A-Record insert “@” in the 1st field and your router’s actual WAN-IP.

  • add a 2nd A-Record, all similar but “www” in the 1st field (for http://www.)

  • e.g. use Google-Apps: (max 50x7GB for free)
    - then create the MX-Records as google-Apps describes

  • you always have to validate before saving before publishing your zone changes.

  • you can also check your Zone-Config by using one of the choosen NS-Servers
    - and lookup for “Any” record.

  • Now make your home Routing Device zoneedit-DynDNSable
    -by googling “Your Devicename, zoneedit”
    - Speedport-Devices: Lorus Blog
    - Fli4L Linux Routers:
    - For every Subdomain you need to generate a cronjobbed script to Update IP, eg. the delivered one 3 Posts further!

  • If Update-URL, Domain-Name, Username and Password are correct: your router always tells its IP to the DNS.

  • Then, in your Routing Device, you have to forward the following Ports to your Server’s fix Local (LAN) IP e.g.
    - 80 for http://, 10000 for Virtualmin/Webmin, 21(22) if you want ftp(ssh) from WAN, 443 if you use SSL-Sites.
    - for Mail etc. Ports if necessary, please google.

  • Now it’s getting serious. Change the DNS of your ip:

  • At your Domain-Seller’s Web-Config you may have Access to like “DNS”, “Whois-Data” or else
    — Find out the IP’s of the 2 Servers (

    — Create the 2 Zoneedit DNS-Servers, and select them for the Domain

  • If you don’t have access to the DNS-Settings, you have to contact your Domain-Seller for changing them.

  • After 2h -2days your DNS-Change should have reached the rest of the world’s DNS

  • Now (or inbetween), in Virtualmin you can create 2 kinds of Vservers: one and lots of’s:

  • 1st make a Vserver with domain -> Servername the is xyz, URL: (+www)
    - Create a “hello world” index.html and upload it to “pubic_html” after ftp-login with name xyz +pw.
    - if DNS-Change for the domain succeeded shout show your “hello world”.

  • Now you can make a 2nd Vserver called e.g. Vserver1.
    - Domain then must be in the 1st field of the Vserver-creation-form.
    - Now upload a index.html into “public_html” after ftp-login with name vserver1 and password
    - Log in to your zoneedit account, edit your zone and create another A-Record
    - The new A-Record must be similar to all others, but in the 1st field you write “vserver1” (not @ or www)
    - After a while should show your index.html that you uploaded in public_html.

2.) Without owing a TLD (ToplevelDomain) you need a DynDNS Service that supports Wildcards.
—> Attention! At you have to pay for wildcards. Watch e.g.

Although wildcards cost, i’ll use in my example:

  • Create an account e.g.
  • You don’t have to manage any DNS-Zone, only
  • Configure your Routing Device for dyndns
  • your 1st Virtualmin-Vserver the must be called xyz also, but with domain
  • your possibly lots of 2nd Vservers then must be called vserver1 also, but domain
    - in your DynDNS-Account, create a Wildcard for vserver1(
  • as you realize, the only difference to 1.) is that between xyz and .com is a .dyndns (e.g.).
    - and you don’t have to manage DNS-Zones or DNS-Records at Domain-Sellers.

sorry for very short 2nd howto, didn’t have to practice it.


I wrote a script: (German)

  • generates a bash-Skript for every Vhost: /root/zoneedit/

  • logging in /root/zoneedit/log/ (logs only changes+time)

  • automatically adds the vhost-bash script to root’s crontab for beeing periodically executed

  • The Sub Skripts checks the Ip’s of the A-Records and the Server’s WAN Ip

  • If they are different, it updates zoneedit immediatelly

  • FOR REMOVAL: delete the Vhost-File in /root/zoneedit and remove it’s line in crontab -e