Got thru to the sysadmin, he enabled 80 to 8080 forwarding locally and Huzzah! Mahara retrieved the public key like it was born to!
Many, many thanks for your guidance, Penny - and if you do have any comments/thoughts about Mahara/Moodle on virtual servers, I'd love to hear them!
Cheers!
In any case, I added the debug line to peer.lib and got these messages:
]]>
PS - Just FWIW, I've got another instance of Mahara up and running with another school's Moodle on servers I control - works great! Now if I can just get teachers & administrators to begin to understand the hows & whys of using it...
Thanks again!
I guess maybe the forwarding is only working for traffic coming from the external interface, which is why the local request to 80 isn't being forwarded to 8080? Is that something you can get whoever does have root access to fix?
Failing that I'm not really sure why putting the port into the mnet settings doesn't work :( I think that should work.
Can you trace through auth/xmlrpc/lib.php and lib/peer.php and see if the port is being stripped somewhere? The closest place to check is in lib/peer.php around line 234 where get_public_key is called - try putting a log_debug($this->wwwroot) just before that call. You'll need to make sure you have the log target for debugging going to your screen too - put this into your config.php:
$cfg->log_dbg_targets = LOG_TARGET_ERRORLOG | LOG_TARGET_SCREEN; ]]>rc.local:echo "Setting Port Forwarding Rules... 80 to 8080, 443 to 8443"
rc.local:iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to ###.###.###.###:8080
rc.local:iptables -A FORWARD -p tcp -s 0/0 --sport 1024:65535 -d ###.###.###.### --dport 8080 -j ACCEPT
(###=IP nums)
PS - I've gotta fly but will be checking later on this evening if you have any cheerie thoughts! Thanks again for your help!
(This is a virtual server, I don't have root access and didn't set up the forwarding...any easy, accessible way to confirm?)
wget http://yourmoodlesite.com/index.php
give me connection refused.
Running:
wget http://yourmoodlesite.com:8080/index.php
Retrieves index.php
Setting Mahara up as a peer did not work as the public key was not retrieved. I tried adding it manually, but this didn't help.
Gotta be the port, I'm guessing, but specifying 8080 when trying to add the authentication method didn't make any difference. Is there something else I can do?
]]>
wget http://yourmoodlesite.com/index.php
Do you get a result?
We certainly have ports blocked. Do we need ports other than 80 (which in our case is forwarded to 8080 where Apache is listening) and/or 443 (forwarded to 8443 for secure login) open?
Just for exercise, I went back and cleaned up the database as instructed in the ReadMeFirst post, then tried again. Same thing.
Thanks again for helping!
Moved Mahara to be directly under http://mdltest.mysite.com - same results, so placing it in a subdirectory is apparently not the issue.
Could there be some kind of permissions issue? The main Mahara data directory is set to 0777, but the generated sub-directories are all 0700 - is this as it should be?
Thanks!
- This server really listens on port 8080, but port 80 is forwarded there. Further, the http://moodle.mysite.com instance is set up to require https secure login, (via port 8443 with 443 forwarded there) but serves all other pages via http. Have tried all 4 ports.
- Have attempted to connect to this Mahara instance from another instance of Moodle on a remote server, with the same results.
- Have double checked Apache virtual host settings for Mahara instance, and find all correct.
Is there a problem accessing Mahara via the subdomain sub-directory? Any other thoughts or suggestions?
Many thanks in advance!