bird-house / pyramid-phoenix

Phoenix is a Pyramid web-application to make it easy to interact with WPS services
http://pyramid-phoenix.readthedocs.io/en/latest/
Apache License 2.0
7 stars 10 forks source link

Wrong redirect from http to https. #33

Closed fklemme closed 9 years ago

fklemme commented 9 years ago

When I connect to http://phoenix:8081, I'll be getting redirected to https://localhost:8443. (The host name has been omitted and replaced by localhost.)

cehbrecht commented 9 years ago

hopefully this happens only if your browser is opened on the same "localhost". Setting the hostname works on my demo server for external use. The nginx config looks fine:

$ less ~/.conda/envs/birdhouse/etc/nginx/conf.d/phoenix.conf
fklemme commented 9 years ago

It says just localhost in my configuration. Doesn't it fetch the system hostname during installation?

What is ${settings:hostname} referring to?

[phoenix_nginx]
...
hostname =  ${settings:hostname}

Or is localhost just hardcoded in birdhousebuilder.recipe.nginx?

self.options['hostname'] = self.options.get('hostname', 'localhost')
cehbrecht commented 9 years ago

it doesn't take the system hostname automatically. You need to set the hostname in custom.cfg (will overwrite settings:hostname). By default the hostname is localhost.

fklemme commented 9 years ago

Stupid me, I should have seen that option as it is already set in custom.cfg.example. Okay, that's fine then, I guess.