I installed Virtualmin with --bundle LEMP however, it doesn’t come with nginx-extras.
I need to use secure-link module in nginx is there a way to enable it with Virtualmin.
I tried apt install nginx-extras but I don’t want to break Virtualmin system and dependencies since installation output is:
root@oci:/home/ubuntu# apt install nginx-extras
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
awstats bind9 bind9-libs bind9-utils certbot clamav clamav-base clamav-daemon clamav-docs clamav-freshclam clamav-testfiles clamdscan cpp cpp-9 etckeeper fonts-lato gcc gcc-9 gcc-9-base git git-man jailkit javascript-common libasan5
libatomic1 libauthen-oath-perl libberkeleydb-perl libc-dev-bin libc6-dev libcc1-0 libcgi-fast-perl libcgi-pm-perl libclamav9 libcommon-sense-perl libconfig-inifiles-perl libcrypt-dev libcrypt-openssl-bignum-perl
libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl libcurl3-gnutls libdbd-mysql-perl libdbi-perl libdigest-bubblebabble-perl liberror-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libexporter-tiny-perl libfcgi-perl libgcc-9-dev
libhtml-template-perl libimport-into-perl libio-multiplex-perl libisl22 libitm1 libjs-jquery libjson-perl libjson-xs-perl liblmdb0 liblsan0 libmail-authenticationresults-perl libmail-dkim-perl libmail-spf-perl libmecab2 libmemcachedutil2
libmoo-perl libmpc3 libmspack0 libmysqlclient21 libnet-cidr-perl libnet-dns-perl libnet-dns-sec-perl libnet-ip-perl libnet-rblclient-perl libnet-server-perl libnet-xwhois-perl libnetaddr-ip-perl libnuma1 libonig5 libparse-syslog-perl
libperl4-corelibs-perl libquadmath0 libruby2.7 libspf2-2 libstrictures-perl libtfm1 libtsan0 libtype-tiny-perl libtype-tiny-xs-perl libtypes-serialiser-perl libubsan1 libuv1 linux-libc-dev manpages-dev mecab-ipadic mecab-ipadic-utf8
mecab-utils milter-greylist mysql-client mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server mysql-server-8.0 mysql-server-core-8.0 ntpdate p7zip php-cgi php-mbstring php-mysql php7.4-mbstring php7.4-mysql postgrey
procmail-wrapper proftpd-basic proftpd-doc python3-acme python3-certbot python3-configargparse python3-future python3-icu python3-josepy python3-mock python3-parsedatetime python3-pbr python3-ply python3-requests-toolbelt python3-rfc3339
python3-tz python3-zope.component python3-zope.event python3-zope.hookable python3-zope.interface rake re2c ri ruby ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 ruby2.7-doc rubygems-integration
sa-compile spamassassin spamc unrar webalizer webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libluajit-5.1-2 libluajit-5.1-common libnginx-mod-http-cache-purge libnginx-mod-http-fancyindex libnginx-mod-http-headers-more-filter libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl libnginx-mod-http-uploadprogress
libnginx-mod-nchan
Suggested packages:
nginx-doc
The following packages will be REMOVED:
nginx-full virtualmin-lemp-stack
The following NEW packages will be installed:
libluajit-5.1-2 libluajit-5.1-common libnginx-mod-http-cache-purge libnginx-mod-http-fancyindex libnginx-mod-http-headers-more-filter libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl libnginx-mod-http-uploadprogress
libnginx-mod-nchan nginx-extras
0 upgraded, 11 newly installed, 2 to remove and 0 not upgraded.
Need to get 1107 kB of archives.
After this operation, 2273 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
Similarly, I can enable secure link module by manually compiling nginx with --with-http_secure_link_module but again I’m not sure it’ll break Virtualmin.
WTF? There is an OS-provided package for it and you’re thinking about compiling from source!?! That’s absolutely crazy talk. Don’t even think it. Don’t ever talk about compiling from source on a production server again.
I’m not sure what to make of the dependency issue. Why does it want to uninstall nginx-full in order to install nginx-extras? I don’t think I understand their reasoning there. Or why nginx-full doesn’t already depend on extras. That’s kinda dumb.
Is there a package we should be depending on instead that is actually a “full” nginx install?
It is much safer to uninstall virtualmin-lemp-stack than to install from source, but you must manually install all of the dependencies that virtualmin-lemp-stack depends on (except nginx-full) before the next time your run autoremove, otherwise you’ll remove literally all of Virtualmin. But, if you can get to the bottom of WTF package we should be installing on Ubuntu, that’d be useful. I can fix it in our virtualmin-lemp-stack package, if there is some more reasonable nginx package(s) for me to depend on.
Nginx for Debian based systems (including Ubuntu) come in multiple flavors…
“nginx-core”, “nginx-light”, “nginx-full” and “nginx-extras”.
From what I read, the above is the order from “smallest” to “largest” install. So basically “nginx-extras” goes a bit further beyond what “nginx-full” that is being used by Virtualmin.
That is why I asked it in this forum first before trying anything. I didn’t compile nginx manually. All I did is using “-b LEMP”, which didn’t setup nginx-full. Since, as you said, nginx full should have come with extras. However, it wasn’t the case. I checked nginx docs; Module ngx_http_secure_link_module (nginx.org)
This module is not built by default, it should be enabled with the --with-http_secure_link_module configuration parameter.
OK, I think we’ll just make the lemp-stack depend on either nginx-full or nginx-extras, as extras seems maybe overkill for most users. So, it will default to nginx-full, as always, but will also allow installing nginx-extras. Should be in place in a few minutes, I think.
After updating virtual-lemp-stack via Virtualmin; MySQL version 8.0.25-0ubuntu0.20.04.1 turned into MySQL version 10.3.29-MariaDB
MariaDB error message
The full MariaDB error message was : DBI connect failed : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I hope this is fixed now with 6.1.3 package (or 6.0.14 on Ubuntu 18.04). It should not change the database on an upgrade. That was a mistake (we’re switching to MariaDB across all platforms in Virtualmin 7, but we shouldn’t have changed the one for the Virtualmin 6 repos at all).
No problem. Perhaps on a side note, if supporting “extras” in the future you could add some additional features (maybe a “pro” thing) to control things like ModSecurity and other add-ons introduced by “extras” in the GUI.
oot@oci:/home/ubuntu# apt-get install --dry-run virtualmin-lemp-stack
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libdbd-mysql-perl libmysqlclient21
Use 'apt autoremove' to remove them.
Suggested packages:
postgresql postgresql-client libdbd-pg-perl libpg-perl
Recommended packages:
libdbd-mysqlb-perl mariadb-server mariadb-client mariadb-common
The following packages will be upgraded:
virtualmin-lemp-stack
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst virtualmin-lemp-stack [6.1.2+ubuntu-20.04] (6.1.3+ubuntu-20.04 . virtualmin-focal:virtualmin-focal [all])
Conf virtualmin-lemp-stack (6.1.3+ubuntu-20.04 . virtualmin-focal:virtualmin-focal [all])
Nope. Shouldn’t look like that. apt-get update again. I made a typo during my substitution which screwed it up even more, but should be fixed by 6.1.4 or 6.0.13.