[Dachs-support] Dachs on a port different from 80
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Fri Sep 21 17:06:10 CEST 2018
Hi Michel,
On Fri, Sep 21, 2018 at 04:20:25PM +0200, Michel Gangloff wrote:
> I am testing dachs using a Docker container on MacOS , starting from the Dockerfile provided on GitHUB
> https://github.com/chbrandt/docker-dachs/commit/86a07996b65620a956e7876193e060b8b83cbe80 <https://github.com/chbrandt/docker-dachs/commit/86a07996b65620a956e7876193e060b8b83cbe80>
>
> For tests purpose, I want to use port 8005 instead of 80 , i.e.
> declare everything with port 80, but use « -p8005:80 » in the
> docker run command
>
> Everything is fine until I want to issue an ADQL query to a published service , from the following page :
>
> http://localhost:8005/__system__/adql/query/form <http://localhost:8005/__system__/adql/query/form>
>
>
> As soon as I click the « go » button ,
> http://localhost/__system__/adql/query/form
> <http://localhost/__system__/adql/query/form> is displayed,
> instead of the above page, generating an error.
>
> It looks like in this case, the declared port, 8005, is not taken
> into account
The problem here is that DaCHS has to know what URL it is visible
under "globally"; this is *not* computed from the bound interface and
the port listened on because in many installations, DaCHS runs behind
some sort of reverse proxy, for instance DaCHS listens on
localhost:8080, but people don't connect it there; external users
instead talk to an apache or nginx on the same box that, say, serves
the URL http://datacenter.farside.observatory.org. And that's where
DaCHS appears to be for these external users.
That's why there is the serverURL setting -- this is what DaCHS uses
whenever it (thinks it) needs to generate a full URL. In your case,
you thus have to write
serverURL: http://localhost:8005
into the [web] section of your /etc/gavo.rc (and restart DaCHS).
-- Markus
More information about the Dachs-support
mailing list