Moving to new server

Moving to new server

โดย Andy Tierling -
Number of replies: 7

I have inherited a project where a Moodle site has been developed in AWS using a dynamic IP address.

I have taken a snapshot of this dev server and created a new instance, this worked fine with a new IP address (once I had used the replace tool to update all instances of IP address and updated the config.php). See first attachment.

As soon as I attach a fixed Domain with DNS entries to a fixed IP address (both a and Cname records) and update the config.php I cannot login to the site to run the replace tool. See second attachment.

It feels like I am missing something obvious but after a lot of head scratching I cannot work out what it is.

Hopefully somebody can provide some pointers because so far I am loving the Moodle system and would be super please to get this working.


Many thanks

Andy



Attachment iq broken.png
Attachment iq works.png
การประเมินโดยเฉลี่ย: -
In reply to Andy Tierling

Re: Moving to new server

โดย Visvanath Ratnaweera -
รูปภาพของParticularly helpful Moodlers รูปภาพของTranslators
I get the login screen by visiting the "Log in" link, yoursite/login/index.php.
การประเมินโดยเฉลี่ย: -
In reply to Visvanath Ratnaweera

Re: Moving to new server

โดย Andy Tierling -
Many thanks for taking the time to read my post and replying.

I should have been more clear, I get to an unstyled login page, but when I enter username and password, I get a this is unsecure message, I continue on but the login doesn't work and I am taken back to the login screen.
การประเมินโดยเฉลี่ย: -
In reply to Andy Tierling

Re: Moving to new server

โดย Gareth J Barnard -
รูปภาพของCore developers รูปภาพของParticularly helpful Moodlers รูปภาพของPlugin developers
Does config.php still have the site at "gama-iq.com"? If not then you need to redo the 'replace tool' bit. The reason you're getting no styles is because the URL's are still using what was set in config.php when the site was working....

Ah, I see it was working with a static IP address, so you need to do the 'replace' / migrate again -> https://docs.moodle.org/401/en/Moodle_migration - so just because I suspect you've got a DNS entry for 'gama-iq.com' that points to the IP, that doesn't mean that you can change config.php from that IP to the domain and it will work... i.e.
Attachment Screenshot 2023-01-14 112003.png
การประเมินโดยเฉลี่ย: -
In reply to Andy Tierling

Re: Moving to new server

โดย Ken Task -
รูปภาพของParticularly helpful Moodlers

Have you setup a certificate for the server's fully qualified domain name yet? (that of gama-iq.com)?   Also, if so, is port 443 open to the globe?   Is firewall for your server allowing any port 80 or 443 traffic?

Moodle caches ... a lot ... a change to either protocol or FQDN requires change to config.php and the running of search and replace from admin side of Moodle.

One could go directly using browser URL to:

http(s)://fqdn/admin/purgecaches.php

You should be prompted to login first and redirected to that script after you have logged on.

'SoS', Ken


การประเมินโดยเฉลี่ย: -
In reply to Andy Tierling

Re: Moving to new server

โดย Visvanath Ratnaweera -
รูปภาพของParticularly helpful Moodlers รูปภาพของTranslators
It depends on how the web server is configures and Moodle too. If the web server serves HTTP for that domain, you should have $CFG->wwwroot='http://YOURDOMAIN'. if it servers HTTPS, then $CFG->wwwroot='https://YOURDOMAIN'.

Well, a back-and-forth between these two can cause havoc, since many things get cached in the server as well as the client. So try with another browser, another computer.

And the only problems is the "insecure" warning? That comes from the browser. You can accept it and move forward.

If you get it halfway running, try to run https://docs.moodle.org/en/Moodle_migration#Update_links_containing_wwwroot_in_the_database.

If nothing helps, switch on https://docs.moodle.org/en/Debugging and get a full trace.

P.S. It is never too late to read the documentation, https://docs.moodle.org/en/Moodle_migration.

P.S. Generally, I avoid exposing the real domain and the IP address of Moodles falling sick.
;)
การประเมินโดยเฉลี่ย: -
In reply to Andy Tierling

Re: Moving to new server

โดย Andy Tierling -
Thank you everyone for all of your help.

Most of my issues were resolved by making sure the config.php wwwroot entry went to the https://FQDN.
Final step was to run the find and replace tool again.
So far all my testing has been successful.

Thanks again!
การประเมินโดยเฉลี่ย:Useful (1)