Submitted by admin@curatebee.com on Fri, 07/03/2015 - 08:04
I am moving to a new hosting server and have found if I create a new virtual server from the menu its all good but if I try and restore a backup in virtualmin I get the error "strict refs" in use at virtualmin-nginx-lib.pl line 251. and it doesnt create the virtual host in NGINX. The file restored in \etc\nginx\sites-available has the incorrect permissions but it is also empty.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Fri, 07/03/2015 - 12:27 Comment #1
Can you post the full error message that you're getting?
Submitted by admin@curatebee.com on Sun, 07/05/2015 - 04:23 Comment #2
As part of restoring the virtual server I get the following error in webmin
Restoring Nginx webserver configuration .. .. Nginx virtualhost was not found after restore!?
I assume it may be this command not working
cp -p \/tmp\/.webmin\/301157_2359_2_restore.cgi\/cleverfinance.com.au_virtualmin-nginx_complete \/etc\/nginx\/sites-available\/cleverfinance.com.au
As once the restore is complete the file under etc\nginx\sites-available has the wrong owners and there is nothing in the file, I have to recreate the file myself.
Submitted by JamieCameron on Mon, 07/06/2015 - 19:12 Comment #3
In your primate Nginx config file, is there an
Include
statement that references/etc/nginx/sites-available
, and if so what does it say exactly? The cause may be that it only matches files with a .conf extension.Also, I assume that the file
/etc/nginx/sites-available/cleverfinance.com.au
was created correctly?Submitted by admin@curatebee.com on Mon, 07/06/2015 - 22:59 Comment #4
NGINX CONFIG FILE
user www-data; worker_processes 2; pid /run/nginx.pid;
events { worker_connections 768; # multi_accept on; }
http {
}
mail { # See sample authentication script at: # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # 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; } }On the second part, the file is not created properly as part of the restore. After restore it is blank and has the incorrect owners. Below is the result from webmin restore
Starting restore of 1 domains from local file /nas/cleverfinance.com.au.tar.gz ..
Extracting backup archive file .. .. done
Restoring backup for virtual server cleverfinance.com.au ..
Restoring virtual server password, quota and other details .. .. done Updating administration password and quotas .. .. done
Restoring Cron jobs .. .. done
Extracting TAR file of home directory .. .. done
Setting ownership of home directory .. .. done
Re-creating records in DNS domain .. .. done
Restoring Webalizer configuration files and Cron job .. .. done
Restoring allowed MySQL hosts .. .. done
Deleting old MySQL databases .. .. done
Re-loading MySQL database cleverfinance ..
Creating MySQL database cleverfinance .. .. done
.. done Restoring Nginx webserver configuration .. .. Nginx virtualhost was not found after restore!?
Re-starting DNS server .. .. done .. failed! See the progress output above for the reason why.
Submitted by JamieCameron on Tue, 07/07/2015 - 01:40 Comment #5
That primary config file looks fine - the real issue seems to be that the backup is missing the config for the original domain. Would it be possible for us to get a copy of the backup you are trying to restore? You can email it to me at jcameron@virtualmin.com
Submitted by admin@curatebee.com on Wed, 07/08/2015 - 22:37 Comment #6
The smallest of the backups I have used is 105MB, don't think your email would cope with that, do you have another way to get it too you?
Submitted by JamieCameron on Thu, 07/09/2015 - 00:39 Comment #7
I could download it via FTP, SCP or HTTP?
Submitted by admin@curatebee.com on Sun, 07/19/2015 - 08:45 Comment #8
I have put the 3 files for a site up for you to download.
https://ext.cleverfinance.com.au/files
username: virtualmin password: 9pk^EBacWscT5nYu
Submitted by JamieCameron on Mon, 07/20/2015 - 01:59 Comment #9
Thanks, I have downloaded the file.
By the way, if you create a new domain with an Nginx website on the same system, does it work OK?
Submitted by admin@curatebee.com on Mon, 07/20/2015 - 06:14 Comment #10
HI Jamie,
Yes a new domain created on the existing system works fine.
Submitted by JamieCameron on Mon, 07/20/2015 - 22:14 Comment #11
So I restored your example backup file just fine on a test Nginx system. However, the cause may be that the config files for new domains are being placed in an unexpected location - can you post your
/etc/webmin/virtualmin-nginx/config
file, so I can see how that is setup?Submitted by admin@curatebee.com on Mon, 07/20/2015 - 22:20 Comment #12
nginx_cmd=/usr/sbin/nginx add_to=/etc/nginx/sites-available stop_cmd=service nginx stop php_socket=1 add_link=/etc/nginx/sites-enabled nginx_config=/etc/nginx/nginx.conf child_procs=4 start_cmd=service nginx start apply_cmd=service nginx restart
Submitted by JamieCameron on Mon, 07/20/2015 - 22:47 Comment #13
Ok, I found the bug that causes this. The work-around till the next release of the Nginx plugin is to remove the
add_to=
andadd_link=
lines , which will cause the configs for restored domains to be added to the main Nginx config file.Submitted by admin@curatebee.com on Wed, 07/22/2015 - 05:50 Comment #14
Thanks, just happy to find the problem and look forward to the release.
Submitted by Issues on Wed, 08/05/2015 - 13:43 Comment #15
Automatically closed -- issue fixed for 2 weeks with no activity.