Redirect between 2 moodles in two different server

Redirect between 2 moodles in two different server

by Eduardo Hm -
Number of replies: 4

Hi community,


I have the following doubt that I do not know how to configure it, to see if someone can help me, which is very easy.


I have two servers (server A and server B), and in both I have two moodle platforms installed completely different from each other.


I have configured that when I access the domain www.mydomain.com go to the Moodle instance of server A. Now the question is, what do I have to configure so that if I access the URL www.mydomain.com/labmoodle I go to B server where I have the other instance of Moodle installed?


Best regards

Average of ratings: -
In reply to Eduardo Hm

Re: Redirect between 2 moodles in two different server

by Ken Task -
Picture of Particularly helpful Moodlers

If I am understanding correctly ... Moodle A and Moodle B have the same fully qualified domain name ... like www.mynet.net.   Didn't think that possible as 2 servers cannot have the same fully qualified domain name in DNS (which maps IP addresses to names, and names to ip addresses.   Those names do NOT include a directory ... like /labmoodle).

So is your goal to have Moodle A public - reachable from outside ... and Moodle B ... the one with moodle in a subdirectory (labmoodle) private - NOT reachable from the outside?

Only way me thinks is to run 'labmoodle' on Moodle A in a subdirectory and not on a separate server and if it's desired that labmoodle be private, restrict access to that directory to the range of IP addresses in your internal network.

'spirit of sharing', Ken




In reply to Ken Task

Re: Redirect between 2 moodles in two different server

by Eduardo Hm -

Good Ken, I'll explain better how I have it mounted:


I have a firewall in front of my entire infrastructure. I have a server A where I have an instance of Moodle. This Moodle instance is accessed directly by the URL of the domain "www.mydomain.com". The firewall redirects external requests TCP 80 to server A.


On the other hand, I have server B with another instance of Moodle, called "labmoodle". Both servers have logically different IPs. What I want to do is, for example, inside Moodle A an activity is configured and this activity wants to refer to the Moodle instance that is on server B, that is, everything that I request from outside to www.mydomain .com / labmoodle redirects me to server B so that Moodle responds. Both Moodle are accessible to the internet. I understand that this configuration is the theme of Apache and to do some rewriting in some .htaccess file, but I do not know exactly how.


regards

In reply to Eduardo Hm

Re: Redirect between 2 moodles in two different server

by Ken Task -
Picture of Particularly helpful Moodlers

Still not understanding ... this is a guess ...

In Moodle A courses (not labmoodle), you desire some activities/links to Moodle B (labmoodle) to pull in the activity/info into a frame of Moodle A so that the URL of access doesn't change? 

And it is your understanding that is a function of Apache re-write.   Is that correct?

Am guessing the purpose in that is you have developed content on labmoodle that you want to display/use on Moodle A without having to replicate/redo on Moodle A.   Is that correct?

'spirit of sharing', Ken