+ Post New Thread
Results 1 to 8 of 8
Web Development Thread, Reverse Proxying with Apache. in Coding and Web Development; I'm currently attempting to set this up to reverse proxy our moodle installation to the outside world. Basically I've been ...
  1. #1

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,071
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144

    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.

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,414
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Reverse Proxying with Apache.

    Is there anything in the apache error log?

  3. #3

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,071
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144

    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;
    Code:
    ProxyHTMLURLMap http://moodle/live /moodle
    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.

  4. #4

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,414
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    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
    Code:
    ProxyPass /moodle/ http://moodle/live

  5. #5

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,071
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144

    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.

  6. #6

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,414
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Reverse Proxying with Apache.

    Yeah, give it a go.. nothing to lose

  7. #7

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,071
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144

    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.

  8. #8

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,414
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Reverse Proxying with Apache.

    Nice one, happy to help



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 2nd November 2007, 10:58 AM
  2. DNS reverse look up zones.
    By Kyle in forum Windows
    Replies: 1
    Last Post: 16th October 2007, 09:42 AM
  3. Reverse proxying SSH...
    By Joedetic in forum Wireless Networks
    Replies: 7
    Last Post: 6th August 2007, 12:56 PM
  4. Reverse Proxy and Moodle
    By wesleyw in forum How do you do....it?
    Replies: 3
    Last Post: 11th June 2007, 02:49 PM
  5. reverse proxy ajax apps
    By CyberNerd in forum Web Development
    Replies: 3
    Last Post: 15th June 2006, 08:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •