ESXi > Debian > Webmin/Virtualmin (WM/VM) > one virtual server web site
[An attempt to upgrade Debian 10 to 11 did not work, and neither did several attempts to install WM/VM over Debian 11.] So, back to a fresh install of Debian 10.12 (supposed to be 10.13 but the install files an results show 10.12), and then a fresh install of WM/VM.
Before the actual restore, the option to show what will be restored gives a warning about DAV: itās enabled in the restored files but not in the new WM/VM configuration. I donāt see an option to exclude DAV from the restore. After the restore, āRe-check and refresh configurationā produces an error:
AH00526: Syntax error on line 46 of /etc/apache2/sites-enabled/suziescollectibles.ca.conf:
Invalid command āDAVā, perhaps misspelled or defined by a module not included in the server configuration
Action āconfigtestā failed.
The Apache error log may have more information.
In Webmin > Servers > Apache > Global config > Config Apache Modules, there are three ādavā lines. Disabled by default. Changing these to enabled allows the VS configuration re-check to complete without errors.
However, it appears that it would be better to disable or remove DAV from the virtual server. In Webmin, it appears that the above three lines in Config Apache Modules would work. However, something needs to be done in Virtualmin. I donāt see any reference to DAV in the current version of Virtualmin.
Thereās no good reason to turn DAV on. It doesnāt work the way it needs to for a shared hosting environment, and there are better ways to interact with the filesystem on the server remotely (FTP, FTP over SSH, Virtualminās File Manager).
Just remove the DAV-related lines from the Apache configuration for that domain and restart Apache.
One reason to switch Apache dav modules on is that virtualmin-git depends on it, but I guess not too many people use that. Restoring a website with git causes the same problem of Apache not starting.
Is that still the case? I though Jamie had switched to using ssh as the default transport like a year or two agoā¦if not, itās a planned change, and Iāll look into what happened to that plan.
Maybe we are on to something. The site has been responding with āconnection refusedā or āThis site canāt be reachedā most of the time. Leaving the link open or retrying often brings up the link. This applies to the site url and login urls for WordPress and WM/VM.
Back to the DAV issue. In /etc/apache2/sites-enabled/[website-url].conf, I deleted the following lines, starting at line 88:
Alias /dav /home/[admin-username]/public.html
<Location /dav>
DAV on
AuthType Basic
AuthName ā[website-url]ā
AuthUserFile /home/[admin-username]/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.3
RewriteEngine off
< Location>
(Space inserted in last line to get it to appear in the quote.)
After rebooting the server with systemctl, trying the site url gave the same response as noted above.
BTW, when I first deleted the lines, a day or two ago, they reappeared after a reboot, or maybe that was an Apache restart. Sorry, not sure about that. Maybe I did not delete properly. Today, however, the deleted lines remain deleted.
The current restore was done through the VM menu Backup and Restore > Restore Virtual Servers. Maybe I need to rebuild the site in Webmin/Virtualmin, then do a restore using the WordPress addon Updraft Plus. If so, I will probably try again to get VM to work on Debian 11, further delaying recovery, but going to Debian 11 now may be better than later.
Thereās clearly a bug here - when restoring a domain with DAV directives in the Apache config that arenāt supported, they should be removed. Iāll look into thisā¦