Closed IlyaSemenov closed 8 years ago
On a fresh Dokku 0.6.5 install, dokku redirect:set app www.app.com app.com generates invalid nginx config:
dokku redirect:set app www.app.com app.com
server { listen [::]:; listen ; server_name www.app.com; return 301 $scheme://app.com$request_uri; }
which gives this nginx error:
nginx: [emerg] invalid port in "[::]:" of the "listen" directive in /home/dokku/app/nginx.conf:38 nginx: configuration file /etc/nginx/nginx.conf test failed
This is because in redirect.conf you rely on NGINX_PORT, and starting from Dokku 0.6 you need to look up PROXY_PORT_MAP for the port (see how the core plugin does that at https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil)
redirect.conf
NGINX_PORT
PROXY_PORT_MAP
On a fresh Dokku 0.6.5 install,
dokku redirect:set app www.app.com app.com
generates invalid nginx config:which gives this nginx error:
This is because in
redirect.conf
you rely onNGINX_PORT
, and starting from Dokku 0.6 you need to look upPROXY_PORT_MAP
for the port (see how the core plugin does that at https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil)