Server hostname

Server hostname

by Grégory Bouckhuyt -
Number of replies: 2
Hello,


I'm going to migrate Moodle from a server to another. (Debian to Debian)

I'd like to know if the hostname of the server (the real hostname, not the url of Moodle) and the entries of /etc/hosts have any impact on Moodle?

In my case, the hostname of the new server is different from the hostname of the old server. Is it a problem?

I have found nothing about it in the documentation or the forums but I'd like to be sure.


Thank you,

Greg.
Average of ratings: -
In reply to Grégory Bouckhuyt

Re: Server hostname

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
No effect at all! It is the server FQDN in the HTTP requests that tells the *web server* where to go.
Average of ratings: Useful (2)
In reply to Grégory Bouckhuyt

Re: Server hostname

by Ken Task -
Picture of Particularly helpful Moodlers
For your reference:

Mr. V is almost 100% correct, but ... there could be a 'but' in a migration.

So you are keeping the same FQDN - changing DNS after you have migrated the moodle to new IP address.   2 servers (unless load balanced) cannot have the same FQDN.   So when you make the DNS change your old site can be accessed only by IP.

Take it that you are migrating a stand-alone server where web service, + DB, +moodledata are all on one server.   And that if you have multiiple instances of Moodle, those are in a subdirectory off web root or you are using virtual domains.

config.php file of the moodles probably use 'localhost' for DB server.   Unless, for some reason, you used an IP address there.

IF you are running some other related service for the moodle(s), those could be configured using IP address.

And ... throwing these out for security purposes ... you might have to re-do your web server certs to be able to run https:// - that's configured outside of Moodle.

and  new server probably runs sshd on 'standard' port 22.  Until you do something to restrict that port, there are many that will begin probes right away.   Check your 'secure' log.

Anyhoo ... my 2 cents!
'SoS', Ken

Average of ratings: Useful (1)