Backup Configuration Files have no nginx webserver option

OS type and version Ubuntu 22.04
Webmin version 2.005

although i can include the /etc/nginx/ path to backup, there is no option available like apache webserver backup module for nginx webserver LEMP Stack.

If you using virtualmin, use the backup there.
Is there some special config you need to backup?

It is a bit odd, in my case it is also not showing nginx, but also gives me the option to attempt backups on modules that are not installed, I have not tested to see if the backups would fail if an invalid module is added, but I would have thought the UI would have only presented the modules you have installed rather than a full list. maybe this is a bug & needs reporting

i need to backup nginx.conf and /nginx/ folder. as you see it shows apache bt not nginx.

yes, it is a LEMP server but no option to backup nginx webserver.

that’s exactly what I said
to clarify, I am seeing this on the virtualmin server that has nginx installed & not apache

yes, you are right. we shouldn’t have apaache backup module on nginx. although it is, nginx is missing.

The restore process is to install Virtuamin with LEMP first (so nginx is installed and configured) and then use Virtualmin restore to restore all your virtual servers. I’ve never used webmin backup/restore as its only need for Webmin only servers.
The missing modules maybe a bug. @jamie ??

OP said

The OP has made a global change, not a domain change so does virtualmin restore the global configuration files as well ? In this case /etc/nginx/ and the files in that directory

I use Nginx exclusively. I have run countless backups and restores using Virtualmin LEMP VMs and they have restored without a problem. I have to conclude that the /etc/nginx/ and its files must be being backed up (otherwise Nginx would fail after every restore).

The continued references to “Apache” despite it not being used/installed is an annoyance but one I have taken to be a *mis spelling* of webserver and just a carry over from the original Virtualmin.

virtualmin backed this up

	root /home/noideersoftware/public_html;
	index index.php index.htm index.html;
	access_log /var/log/virtualmin/noideersoftware.uk_access_log;
	error_log /var/log/virtualmin/noideersoftware.uk_error_log;
	fastcgi_param GATEWAY_INTERFACE CGI/1.1;
	fastcgi_param SERVER_SOFTWARE nginx;
	fastcgi_param QUERY_STRING $query_string;
	fastcgi_param REQUEST_METHOD $request_method;
	fastcgi_param CONTENT_TYPE $content_type;
	fastcgi_param CONTENT_LENGTH $content_length;
	fastcgi_param SCRIPT_FILENAME "/home/noideersoftware/public_html$fastcgi_script_name";
	fastcgi_param SCRIPT_NAME $fastcgi_script_name;
	fastcgi_param REQUEST_URI $request_uri;
	fastcgi_param DOCUMENT_URI $document_uri;
	fastcgi_param DOCUMENT_ROOT /home/noideersoftware/public_html;
	fastcgi_param SERVER_PROTOCOL $server_protocol;
	fastcgi_param REMOTE_ADDR $remote_addr;
	fastcgi_param REMOTE_PORT $remote_port;
	fastcgi_param SERVER_ADDR $server_addr;
	fastcgi_param SERVER_PORT $server_port;
	fastcgi_param SERVER_NAME $server_name;
	fastcgi_param PATH_INFO $fastcgi_path_info;
	fastcgi_param HTTPS $https;
	location ^~ /.well-known/ {
		try_files $uri /;
	location ~ "\.php(/|$)" {
		try_files $uri $fastcgi_script_name =404;
		default_type application/x-httpd-php;
	fastcgi_split_path_info "^(.+\.php)(/.+)$";
	listen ssl;
	ssl_certificate /etc/ssl/virtualmin/1707730203189664/ssl.combined;
	ssl_certificate_key /etc/ssl/virtualmin/1707730203189664/ssl.key;

my /etc/nginx/nginx.conf is

user www-data;
worker_processes auto;
pid /run/;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 768;
	# multi_accept on;

http {

	# Basic Settings

	sendfile on;
	tcp_nopush on;
	types_hash_max_size 2048;
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	# SSL Settings

	ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
	ssl_prefer_server_ciphers on;

	# Logging Settings

	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;

	# Gzip Settings

	gzip on;

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

	# Virtual Host Configs

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
	server_names_hash_bucket_size 128;

#mail {
#	# See sample authentication script at:
#	#
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}

where is the correlation between what virtualmin has backed up and /etc/nginx/nginx.conf, apart from

include /etc/nginx/sites-enabled/*;

so if I change, in /etc/nginx/nginx.conf

server_names_hash_bucket_size 128;


server_names_hash_bucket_size 256;

the virtualmin restore will make that change when I restore the virtualmin backup to my new server ?

Yes - this will be fixed in the next release of the Nginx plugin.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.