Submitted by eddybennett on Sun, 09/20/2015 - 10:10
Hi,
I'm trying to restore a virtual server from a backup but I'm getting the following error:
Nginx virtualhost was not found after restore!?
The result is the virtual server is missing it's nginx configuration option.
I was attempting the restore from the control panel. When I attempted from the command line, it didn't produce any errors but I couldn't see the virtual server in the control panel afterwards.
Any help would be appreciated.
Thanks
Eddy
Status:
Active
Comments
Submitted by kindnation on Sun, 09/20/2015 - 19:43 Comment #1
I am using only Nginx servers with Virtualmin and they all have the same issue. Jamie manually fixed one of the servers, and said he was going to push out the update, but it's been a few weeks. Not sure what the status is.
For the time being, I have to rebuild the nginx/sites-available/(SITE) file manually after restoring it from the control panel.
You can copy a working (SITE) to your restored (SITE) nginx config, and then do search and replace all the site names inside. You will also have to get the PHP-FCGI process that has to be replaced. You can use:
virtualmin list-domains --domain yoursite.com --id-only
Submitted by JamieCameron on Mon, 09/21/2015 - 00:25 Comment #2
Yes, this sounds similar to an existing Nginx issue. The quick work-around is you edit your Nginx config file and change the line like :
include /etc/nginx/sites-enabled/*.conf
to :
include /etc/nginx/sites-enabled/*
Submitted by kindnation on Mon, 09/21/2015 - 00:56 Comment #3
Hi Jamie,
The default nginx.conf on Debian is already:
include /etc/nginx/sites-enabled/*
Could you push out a fix for the virtualmin restore? It's been an issue for quite some time now.
Submitted by JamieCameron on Mon, 09/21/2015 - 22:58 Comment #4
I can provide you with a pre-release beta that should fix this - which Linux distribution and version are you running?
Submitted by kindnation on Tue, 09/22/2015 - 02:39 Comment #5
Hi Jamie,
That would be great. I'm running Debian 7 (Wheezy).
Submitted by eddybennett on Tue, 09/22/2015 - 12:38 Comment #6
Thanks for the advice, guys. I'm assuming Jamie is the developer behind virtualmin?
Submitted by eddybennett on Tue, 09/22/2015 - 12:39 Comment #7
I'm also running debian wheezy. Thanks!
Submitted by JamieCameron on Tue, 09/22/2015 - 23:02 Comment #8
Ok, you can download an updated Nginx plugin in Debian package format from http://download.webmin.com/download/plugins/webmin-virtualmin-nginx_1.9_...
Submitted by eddybennett on Wed, 09/23/2015 - 11:05 Comment #9
Great stuff, do you have a guide for how to install it?
Many thanks
Submitted by andreychek on Wed, 09/23/2015 - 11:11 Comment #10
If you go into Webmin -> System -> Software Packages, you can select the "From ftp or http URL" option, and there, paste in the URL Jamie mentioned in Comment #8.
Submitted by eddybennett on Thu, 09/24/2015 - 03:14 Comment #11
Great, thanks
Submitted by eddybennett on Sun, 09/27/2015 - 04:29 Comment #12
Ok so I've just given this a go, but my php socket does not appear to have been created, e.g. this is what I have on my config file from the original virtual server:
Do you know how to ensure this is created?
Thanks
Submitted by JamieCameron on Sun, 09/27/2015 - 11:47 Comment #13
Do you mean that the directory
/var/php-nginx/1354095995938.sock
doesn't get created, or that nosocket
file is created inside it?