Reverse Proxying with Apache.
I'm currently attempting to set this up to reverse proxy our moodle installation to the outside world. Basically I've been following the instructions on this website http://www.apachetutor.org/admin/reverseproxies
I've got most of it working, moodle will sort of come up on the screen, but the cruicial bit I can't get working is bit that re-writes the HTML links so they work from the external address. This uses the command 'ProxyHTMLURLMap . . . ' which when I put in the httpd.conf file, causes the apache server to not start but it doesn't tell me why! Everything else contained in those instructions works fine, but not that bit!
Has anyone got any idea what I'm doing wrong?? I've spent virtually all day trying to get this working properly, but I cannot get apache to accept this command!
Cheers,
Mike.
Re: Reverse Proxying with Apache.
Is there anything in the apache error log?
Re: Reverse Proxying with Apache.
No there isn't anything put in the error log when I try and start the service. It's definitely something to do with the command 'ProxyHTMLURLMap' or something related to the module or process that that command calls, I just can't figure it out!!
The exact line in my file reads;
My understanding is that it should rename anything refering to http://moodle/live (which is the address of our on-site moodle install) with http://www.nbc.medway.sch.uk/moode which is the address forwarded to the on-site installation via proxy.
As I say, it makes an attempt to call it up, but where it tries to call up pages using the setting in moodles config.php file (which points to our on-site server) it obviously can't find them, and attempts to display half a page. All i need is these page links to be rewritten to point to the correct address, which I understand apache will do using the above command, if I can get it to work!
I've followed those instructions word for word, and everything else on them works fine, all the modules I need are installed etc. so I'm really at a loss as to why it won't work!
Cheers,
Mike.
Re: Reverse Proxying with Apache.
Is there no way you can modify your Moodle installation then to reflect the actual 'outside' URL? (To access this inside you could create an alias in the DNS matching the external access one)
That way you can just use the simple
Re: Reverse Proxying with Apache.
Ahhhh, that's a brilliant idea. That would still allow internal access without going through the LEA server (which is the idea given the un-reliability of my LEAs internet connection) Good bit of lateral thinking, I'll try that tomorrow. Thanks for that suggestion, I see no reason logically why that shouldn't work!
Cheers,
Mike.
Re: Reverse Proxying with Apache.
Yeah, give it a go.. nothing to lose :)
Re: Reverse Proxying with Apache.
YAY it works!!
if you visit www.nbc.medway.sch.uk/moodle you get my moodle installation which is being reverse proxied by apache to my on-site server. If I pull out my internet link and visit the same address inside the school it now sucessfully resolves to my internal server, and works! Exactly what I was trying to achieve.
Many thanks for the suggestion, I seriously would not have thought of that way round things.
Cheers,
Mike.
Re: Reverse Proxying with Apache.
Nice one, happy to help :)