Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
2.4k views
by Talented

When cloning a Webinoly site externally [same domain, new webhost, new server] I need to provide credentials for the new server.

I have already installed Webinoly and the same domain/site on the new server.

To clone the site...

DB Username -- should I use the db_user, root or admin username?  

DB Password -- if it's the db_user, do I use root, admin or another password? 

https://i.imgur.com/WL0LwOt.png

1 Answer

+1 vote
by Expert

Terence, we don't provide support for external tools, I know nothing about "ManageWP", but I think is safe to assume that the DB user/pass used in wp-config is enough for this task. You can see these credentials with the "info" command: sudo example.com -info

Of course, my official answer should be: Please, use the backup tools provided by Webinoly, cloning sites, backups and export/import tools are all available directly from the command line without the need of heavier GNU tools. wink

Regards.

by Talented
It was my impression that Webinoly exporting or cloning only worked on the local server, not from  one server to another. Am I right or am I confused?
by Expert
Cloning is only local.

Export/import (whole server or single site) works on different servers. It actually works locally too, eventhough it doesn't make sense to use it this way.
by Talented
Ah, that's where I got the impression it was only possible locally then. But as Webinoly exporting a single site and importing it on a remote server would solve the problem, I'll take a look at that, instead of using external tools.

Many thanks.
by Talented

Hmm, not too shabby!

I'm guessing this was NginX having a problem with no certificates, right?

https://i.imgur.com/QO29WE5.png

by Expert

Check the output of: sudo nginx -t to see what is failing.

by Talented
by Expert
Yes, Webinoly does not include custom cert files in the export/import process.
by Talented
I better go find them then and transfer them manually.
by Talented

When I transferred the Cloudflare cert manually and changed the DNS to the new server I got this -- https://i.imgur.com/Ym6laf8.png

Still trying to find out why.  Any idea?

by Expert

Nginx needs to be reloaded after the cert file is transfered.

sudo nginx -t && sudo service nginx reload
by Talented
Nope. I already did that.
by Expert
  • Check the nginx -t output.
  • Check your error logs: sudo log -error
  • You can enable the access logs: sudo log example.com -only-error=off and see if your request is actually hitting the server sudo log, if not then it's probably related to Cloudflare.
Log viewer works in real-time, so when you're viewing your logs you need to refresh your browser to see what happens in your server.
by Talented

The NginX config is fine, I already checked it. 

https://i.imgur.com/9BzXLUY.png

But the error is strange as I know the certificate is in /etc/nginx/certs/ because I put it there. Could be a permissions issue?

by Talented
When I check CHOWN verything is set to root root and nothing to www-data
by Expert
I don't know...

Maybe another custom configuration not migrated and needed by CF?

Maybe, CF caching your errors?
by Talented
I put the site into developer mode and disabled Cloudflare entirely including un-proxy-ing the DNS, so I doubt its that.
by Expert
Ok, that's the error!

You're using a CF (client-cert) in Nginx and it will cause error when trying to have access directly, that cert only work with CF, try removing the cert conf from Nginx and reload Nginx.
by Talented
What do you mean by "cert conf" ?
by Talented

When I hashed out the certificate in sites-available I got this...

https://i.imgur.com/s2wnDXR.png

by Talented
I am thinking... originally I did a Webinoly export and then imported the whole server "import=full" so what else might be missing?
by Expert
The thing is that you have a client cert configured (cloudflare.crt), that's a kind of "authentication", which means that in order to have access to your server, the source needs to send a chain that matches the cert you have configured. When you have this option enabled in CF they send this chain and they are the only ones that can have access to this site.

That's why you cannot view your site using your browser, because you are not sending this chain.

You need to remove this CF configuration from Nginx. The error you are getting is because you need to remove all the lines, not just the cert: "ssl_client_certificate" and "ssl_verify_client".

Another option is that you can use CF with this option enabled and access your site only through CF.
by Talented

I put everything on CF back as it was and switched the DNS back to the original server and this is what I see -- https://horseboxheaven.uk/

So my question to you is, how do I use webinoly to move this site to another server? Because obviously, the way I did it didn't work.

I read the docs and did this...

sudo webinoly -backup=local -export

FTP'd the file to the new server and then...

sudo webinoly -backup=local -import=full -file=/var/www/webinoly_full_backup_2020-12-30-20:53:44
 

by Expert
It has nothing to do with the migration process, your problem is the Cloudflare configuration.
by Talented
Yes, I get that, but what I am saying is that there has to be something that Webinoly has not transferred or is not activating correctly because the one is a copy of the other, apart from the cloudflare.crt which I transferred manually.

How do I get Webinoly to recreate the chain that matches the Cloudflare cert I have configured?
by Expert
In your case is CF who sends "the chain", not Webinoly, Webinoly cannot recreate that chain. Is the source of the request who needs/sends that chain to access the server. That's why I think your issue is with CF and not on the server side.
by Talented
I found the source of the problem -- me!

Not wanting to wait for the IP to propagate, during server setup I had changed my local hosts file on my PC in order to access the domain under the new IP address. Apparently, this short-circuiting of CF's DNS was causing the problem because as soon as I removed the IP from the hosts file the site worked perfectly.

So first let me say, again, sorry for burdening you with a problem I caused.

Secondly, let me say what a joy it is to use Webinoly export and import. It is, without a doubt, the most powerful but easy to use site/server migration too I have ever used. I will never use any other.

Excellent, thank  you so much Cristhian.
by Expert

Glad you have found a solution!

Now I'm thinking that maybe in the future I can add some extra locations to look at when exporting a server, for example /etc/nginx/certs if not empty we should include it in the exported file. 

I need to make a list of the most commonly used locations.

by Talented
Good idea, although it wouldn't have stopped me from making this mistake.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...