Restoring Nginx websites error

I am using Virtualmin with Nginx, and after trying to migrate from one VPS to another by restoring from backup, NGINX fails to start.

I have found two problems with the restore:

1) Under the > Other restore options > original IP address, or Shared, on 111.111.111.111 (I select Shared, with the IP address of the server), the /etc/nginx/sites-available/restoreddomain.conf shows the original IP address. I have to edit the line (it is showing the old IP address):

listen 111.111.111.111;

2) The line that points to the PHP FCGI has been truncated. It shows:

fastcgi_pass unix:;

It should be:

fastcgi_pass unix:/var/php-nginx/150973604023781.sock/socket;

(this seems to be a new bug, because previous restores did not have the issue pointing to the fastcgi socket).

Status: 
Active

Comments

I also observed the above issues when restoring my Nginx sites.

Both IPv4 and IPv6 "listen" lines don't get updated to the selected IP upon restore, causing issue with nginx startup (as it tries to bind to the IP that doesn't exist).

Is there any command line to rewrite nginx configuration files?