Cannot Get Reverse Proxy to Work

jammastercd
Posts: 18
Joined: Mon Jan 03, 2011 11:57 am

Cannot Get Reverse Proxy to Work

Postby jammastercd » Wed Jan 19, 2011 11:54 am

I currently have three web apps installed on my HDA: TinCanJukebox, Gallery3 and WordPress, and I'll likely add more in the future. I'd like to be able to access these apps via the web. I've purchased and set up a domain name (mydomain.com) to forward to my HDA domain name (username.yourhda.com). I've also set up port forwarding on my router's firewall, so I can successfully access my HDA dashboard. When I click on one of the three web apps from the HDA dashboard, such as TinCanJukebox, it tries to open a URL based on my LAN domain name (jukebox.homedomain.com). Of course this fails when outside my home network.

I tried Web-Apps-Proxy, but I wanted to have a separate URL for each web app while using one domain name. That way I could send my in-laws the URL to get directly to Gallery3, rather than opening a landing page and then navigating to the appropriate web app.

One option I found was to set up a reverse proxy for each web app, so they would have the following URL's:
-mydomain.com/music --> TinCanJukebox
-mydomain.com/pictures --> Gallery3
-mydomain.com/blog --> WordPress

I edited the Apache httpd.conf file by adding the following lines:
ProxyRequests Off
<Proxy*>
Order deny,allow
Allow from all
<Proxy/>
ProxyPass /music http://jukebox.homedomain.com
ProxyPassReverse /music http://jukebox.homedomain.com

I then restarted the Apache server and tried accessing the URL mydomain.com/music, which successfully tried to forward to username.yourhda.com/music. However, I received a 400 Bad Request Error, stating that the browser sent a request that the server could not understand.

I've confirmed that the URL http://jukebox.homedomain.com works while inside my network, so there must be something wrong with my reverse proxy configuration. The reverse proxy syntax seems pretty straightforward, so I must be missing something pretty obvious. I'm a relative noob to the Linux/Apache world, so any help would be greatly appreciated!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Cannot Get Reverse Proxy to Work

Postby bigfoot65 » Thu Jan 20, 2011 1:24 pm

have you tried this?

http://wiki.amahi.org/index.php/Hosting ... le_Webapps

Same concept...but might work better for what you are trying to do.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

jammastercd
Posts: 18
Joined: Mon Jan 03, 2011 11:57 am

Re: Cannot Get Reverse Proxy to Work

Postby jammastercd » Mon Jan 24, 2011 8:41 pm

I've tried the method to host multiple web apps by adding CNAME records to mydomain.com via GoDaddy.com:
-music points to music.mydomain.com
-pictures points to pictures.mydomain.com
-blog points to blog.mydomain.com

I then added a ServerAlias row to each web app .conf file, such as:
ServerAlias music.mydomain.com
for TinCanJukebox.

When I type the URL music.mydomain.com into my web browser, I get an error stating that the website is temporarily unavailable. Is this because the DNS needs to get updated? Should I wait a while and then try again later? Also, did I set up my CNAME records appropriately? Or should I point music to @, which points to the host mydomain.com?

jammastercd
Posts: 18
Joined: Mon Jan 03, 2011 11:57 am

Re: Cannot Get Reverse Proxy to Work

Postby jammastercd » Tue Jan 25, 2011 1:24 pm

Quick update on my progress:
I changed the IP address for the host record of my domain via GoDaddy by pointing it to the IP address listed on my HDA control panel. I now can access my web apps via a URL like music.mydomain.com!

One final question I have is will the IP address listed on my HDA control panel change, or is that a stable IP address associated with my dynamic DNS setup?

Thanks! :D

Who is online

Users browsing this forum: No registered users and 14 guests