1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Rep Power

    Dynamic DNS and reverse proxies: Can this be done?

    Here is my situation. I have a LAN at home, behind a regular router.

    I have my server on, on this I have bind9 running, apache2 on port 80. Tomcat on port 8082 and another tomcat on port 8083.

    I have successfully setup bind so that when I am inside my LAN I can enter:

    app1.mylan.com Apache will reverse proxy this to app1.mylan.com:8082 and it shows in the browser as app1.mylan.com

    Same goes for app2. (i.e. app2.mylan.com -> app2.mylan.com)

    However, my router has dynamic dns setup.

    How can I reach app1.mylan.com via dynamic dns. I've tried setting up a URL redirect with my DNS provider (even enabling cloaking)

    but what happens is that in the browser, the apache server tries to serve up the content as if it was on port 80, and I get a 404 (I see the dyndns address in the page returned).

    It's as if the reverse proxy is not working due to the dyn dns.

    Can this be done with dynamic dns???

    Many thanks,

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Nebraska, USA
    Rep Power
    I've never attempted this before, but, doing some "google research" it looks as if this should be possible by setting up another Vhost for your dynamic dns host/domain and using ProxyPass and ProxyPassReverse to point to your app1 and app2 sites.

    Something like this:

    <VirtualHost *:80>
    ServerName your.dynamicdns.tld
    ProxyPass /app1 http://app1.mylan.com:8082/
    ProxyPass /app2 http://app2.mylan.com:8083/
    ProxyPassReverse /app1 http://app1.mylan.com:8082/
    ProxyPassReverse /app2 http://app2.mylan.com:8083/
    this should, in effect, passthru any requests for your dynamicdns host /app1 folder to app1 and app2 folder to app2.

    As I said, I've never attempted anything like this , so, I dunno if it'll work or not.
    Good Luck.

IMN logo majestic logo threadwatch logo seochat tools logo