I've enabled wildcard dns :
Service configuration -> Website options -> Website matches all sub-domains -> Yes
Sot the feature gotenabled correctly.But when I run :
virtualmin disable-feature --dns --web --all-domains
and then run :
virtualmin enable-feature --dns --web --all-domains
I can see wildcard dns and virtualhost records are not set at all, also the 'Website matches all sub-domains' option has changed to no !
Status:
Active
Comments
Submitted by JamieCameron on Mon, 09/12/2011 - 23:03 Comment #1
That is expected .. when you disable the website and DNS zone for a domain, all records and the apache config are lost. This also applies to any other web-related settings, such as a the PHP execution mode, per-directory PHP versions, redirects and proxies.
They can be stored in /etc/webmin/virtual-server/domains/ for future use.
Submitted by JamieCameron on Tue, 09/13/2011 - 00:24 Comment #3
Yes .. but this goes against the general design of Virtualmin, which is to store all settings in the underlying configuration files where possible.
Out of interest, why are you trying to delete and then re-create the websites for all your domains?
hm, I myself use it because of making group changes to /etc/webmin/virtual-server/domains/ files, for instance I've migrated a cpanel file, the dns_ip was not set and so the records was pointing to 127.0.0.1, or running a reverse proxy,...
I think maybe suspending a virtual-server and unsuspending it also affected by this issue (?).
Submitted by JamieCameron on Tue, 09/13/2011 - 13:58 Comment #5
Suspending and un-suspending won't cause this issue, as they keep the current config.
If you want to force re-setup of DNS records, just disabling and re-enabling the
dns
feature should be enough.A wildcard dns uses both DNS records (*.domain.com in A ... ) and virtualhost (Server alias *.domain.com)/
A wildcard dns uses both DNS records (*.domain.com in A ... ) and virtualhost (Server alias *.domain.com)/
Submitted by JamieCameron on Tue, 09/13/2011 - 17:47 Comment #8
Ok, that's a bug .. if you disable and then re-enable DNS, the * record should be put back. I will fix that in the 3.89 Virtualmin release.
No , It's not a bug.I've checked /etc/webmin/virtual-server/domains/ file of related virtual-server.As the wildcard record is not stored there, so disabling and enabling it should not add any DNS or vhost record.
Please either add both dns (*.mydomain.com. IN A ...) and vhost (ServerAlias *.mydomain.com) records or not touch current config.
:D
Submitted by JamieCameron on Wed, 09/14/2011 - 02:06 Comment #10
What I meant was, if a domain has a wildcard DNS record and a *.domain.com ServerAlias in the apache config, disabling and then re-enabling DNS should put back the wildcard DNS record.