Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.63 KB

File metadata and controls

41 lines (33 loc) · 1.63 KB

Development

All development done in the 'src' directory, can be run under a docker container. This allows development against the proper nginx version, even under OSX (and makes sure your environment matches the live environment as close as possible)

cd ~/projects/proxy
./proxy.sh run

To get the proxy key, use

./proxy.sh getproxykey

The reverse proxy will be available on http://127.0.0.1:41080/ and https://127.0.0.1:41443/

You can access the management interface on https://127.0.0.1:41443/admin/ using user 'webhare' and the proxykey obtained above. (and for historical reasons, also on https://127.0.0.1:45443/)

Other useful commands

To get a shell inside the proxy

./proxy.sh shell

To restart the admin interface process (after changing its code)

docker exec testproxy sv restart configserver

OSX development tips

To connect this nginx-proxy back to WebHare on OSX:

  • Add an extra loopback address for testing, eg sudo ifconfig lo0 alias 10.55.55.55 - machines in docker will be able to connect here
  • Make sure WebHare's secure port listens to this address, eg by starting it WEBHARE_SECUREPORT_BINDIP=10.55.55.55 wh console
  • Add a proxy in WebHare in the webservers application

The docker container publishes its internal ports 80 and 443 on 41080 and 41443, so your sites should be available on these ports (eg https://webhare.moe.sf.b-lex.com:41443/ )