Forum

Reverse proxy to Plex Server IP on same machine returns 404

Trevor
23 February 2015, 01:26


Hiawatha version: 9.12
Operating System: Windows 7 64 Pro

mydomain.com Dynamic DNS to my FiOS public IP
plex.mydomain and *.plex.mydomain.com CNAME to mydomain.com
FiOS public IP 80/443/8081 etc port forward to static LAN PC IP 192.168.1.10

192.168.1.10 also has a Plex media server running on it at 192.168.1.10:32400/web

Static webpage index.html works great with Hiawatha for mydomain.com.

I can't get a reverse proxy to work for plex.mydomain.com to 192.168.1.10:32400/web, it always returns a 404 (while connecting to 192.168.1.10:32400/web while on that PC works fine).

The error log has this:
Sun 22 Feb 2015 19:01:55 -0500|Reverse proxy read error for 192.168.1.10


I've read everything I can find Googling against your forum and similar problems for those running IIS, Apache, and Nginx, any ideas you have would be greatly appreciated.

Hiawatha Config:
# Hiawatha main configuration file
#

# GENERAL SETTINGS
#
#ServerId = www-data
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = C:\Program Files\Hiawatha\log\system.log
GarbageLogfile = C:\Program Files\Hiawatha\log\garbage.log
ExploitLogfile = C:\Program Files\Hiawatha\log\exploit.log
PIDfile = C:\Program Files\Hiawatha\log\hiawatha.pid

Binding {
Port = 80
Interface = 192.168.1.10
}

#UrlToolkit {
# ToolkitId = webproxy
# Match ^mydomain.com/web(.*) Rewrite 192.168.1.10:32400/web$1
#}

Hostname = 192.168.1.10
WebsiteRoot = Z:\wwwroot
StartFile = index.html
AccessLogfile = Z:\wwwroot\mydomain\files\log\root_access.log
ErrorLogfile = Z:\wwwroot\mydomain\files\log\root_error.log

# Main Site
VirtualHost {
Hostname = mydomain.com
WebsiteRoot = Z:\wwwroot\mydomain
StartFile = index.html
AccessLogfile = Z:\wwwroot\mydomain\files\log\main_access.log
ErrorLogfile = Z:\wwwroot\mydomain\files\log\main_error.log
# UseToolKit = webproxy
}

#Plex Server
VirtualHost {
Hostname = plex.mydomain.com, *.plex.mydomain.com
EnablePathInfo = yes
WebsiteRoot = Z:\wwwroot\mydomain
AccessLogfile = Z:\wwwroot\mydomain\files\log\plex_access.log
ErrorLogfile = Z:\wwwroot\mydomain\files\log\plex_error.log
ReverseProxy (.*) http://192.168.1.10:32400/web 20 keep-alive
}



Thanks in advance!
Trevor
23 February 2015, 01:30
I should mention I've also tried the Plex virtual host config like this with no different results:

#Plex Server
VirtualHost {
Hostname = plex.tgfisher.com, *.plex.tgfisher.com
WebsiteRoot = Z:\wwwroot\tgfisher
AccessLogfile = Z:\wwwroot\tgfisher\files\log\plex_access.log
ErrorLogfile = Z:\wwwroot\tgfisher\files\log\plex_error.log
ReverseProxy .* http://192.168.1.10:32400/web keep-alive
}
Hugo Leisink
23 February 2015, 09:53
Can you confirm that the website at http://192.168.1.10:32400/web works? Can you tell me what the URL's of that website look like?
Trevor
23 February 2015, 19:51
Sure!

I'm on LAN now and have no problem bringing up the site on any LAN computer @ "192.168.1.10:32400/web".

Here's some page source in case that helps:

<html lang="en" data-cast-api-enabled="true">

<head>
<title>Plex</title>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="apple-mobile-web-app-capable" content="yes">

<link rel="stylesheet" href="css/main.css?hash=857e86d">
<link rel="shortcut icon" href="favicon.ico">

<link rel="apple-touch-icon-precomposed" href="img/ios/icon-iphone.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ios/icon-ipad.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ios/icon-iphone@2x.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ios/icon-ipad@2x.png">

<link rel="apple-touch-startup-image" media="(device-width: 320px)" href="img/ios/startup-iphone-portrait.png">
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" href="img/ios/startup-iphone-portrait@2x.png">
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" href="img/ios/startup-iphone5-portrait@2x.png">
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (orientation: portrait)" href="img/ios/startup-ipad-portrait.png">
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (orientation: landscape)" href="img/ios/startup-ipad-landscape.png">
<link rel="apple-touch-startup-image" media="(device-width: 1536px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="img/ios/startup-ipad-portrait@2x.png">
<link rel="apple-touch-startup-image" media="(device-width: 1536px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" href="img/ios/startup-ipad-landscape@2x.png">
</head>

<body>
<div id="plex" class="application">
<div class="scroll-container dark-scrollbar">
<i class="plex-image-preloader plex-image logo"></i>
</div>
</div>

<script>
window.PLEXWEB = { bundled: true, hosted: false };
</script>

<script id="plex-script" src="js/plex.js?hash=857e86d&version=2.3.20"></script>
</body>

</html>
Hugo Leisink
24 February 2015, 13:19
I have no idea what goes wrong. For some reason, Hiawatha got a read error from the OS while reading from a socket (which is connected with 192.168.0.1). Is there anything in the error log at 192.168.0.1?
Trevor
24 February 2015, 19:09
Not in any of my Hiawatha server or system logs. Did you install Plex to try it and figure that out?

Is there any way for me to debug further to provide more useful information?
Hugo Leisink
28 February 2015, 07:46
No, I don't use Plex. It's hard for me to tell what's going on from a distance...
This topic has been closed.