-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiles attempt loading from 127.0.0.1 -- no obvious hostname config #30
Comments
Hey @jywarren. If you want to mount on port 80 you should be able to do (i think references to localhost should be harmless and only used if logging it turned on - its default off):
{
"uiPort":80,
"tilePort":80
} Though it looks like there is a subtle bug, whereby the tileserver is not mounting on the proper port (if you supply different ports for tiles vs ui). This does not work (because tiles still mount on 8000):
{
"uiPort":8000,
"tilePort":8001
} |
re: possible issues with hostnames, do you have a local dns or any edits to /etc/hosts? |
hey dane -- actually the port # is not so important, i'm just running a reverse proxy on Apache to point it back. The ul loads, it's just the tiles themselves that are routed to 127.0.0.1. I am running it from my server and accessing it from my laptop. So if i had run it locally it would work fine -- maybe that's why the issue is not coming up for most people? Somewhere, the tile URLS are being generated for 127.0.0.1. I thought i'd found it at the bottom of /modules/tilelive.js/bin/tilelive_server.js, (i'm running the master-ndistro branch), but i wasnt sure that's what's generating the OpenLayers UI. |
and to answer your Q, no, no local DNS or hostfile edits. |
I guess i'm looking for some config for the uiserver that looks like: host: tilestream.publiclaboratory.org |
Hey @jywarren, TileStream by default has no explicit host configuration -- instead, it expects that the HTTP request being made against it provides a proper My guess is that the Apache reverse proxy on your server is stripping this header from the requests that your laptop is making. Perhaps you can try setting the http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypreservehost |
That worked perfectly! I hadn't thought of that, though it was indeed odd that i couldn't find a reference to 127.0.0.1 in the tilestream source tree. Good catch. |
I booted up tilestream at:
http://tilestream.publiclaboratory.org/
and at first, one tileset worked and one showed up grey. Now both are failing to load, and I'm getting "Failed to load resource: Could not connect to the server." for 8.png,
I realized it's requesting them from 127.0.0.1, not tilestream.publiclaboratory.org. I tried grepping around but couldn't find either an obvious place to change 127.0.0.1 or instructions or examples on the config JSON file ... also i noticed "localhost" was hardcoded in many places, though i imagine that's just internal references between the ui server and other parts.
This is probably a really minor thing but could someone post an example config JSON file? that ought to clear things up. And/or providing for a host as a commandline flag.
Thanks! Great stuff.
The text was updated successfully, but these errors were encountered: