ketchuphq / ketchup

A simple CMS :tomato:
https://ketchuphq.com
Apache License 2.0
393 stars 31 forks source link

listen on 0.0.0.0 instead of 127.0.0.1 #10

Closed xu4wang closed 6 years ago

xu4wang commented 6 years ago

Hello,

I tried to make ketchup listen on 0.0.0.0, so other computer can access it.

I made following configuration file based on https://github.com/octavore/nagax/blob/master/router/module.go

but still it's listening on localhost.

austin@cti:~/work$ cat config.json 
{
  "bindext": true,
  "port": 9999,
  "data_dir": "data",
  "bolt": {
    "path": ""
  },
  "backup": {
    "enabled": false
  },
  "themes": {
    "path": "themes",
    "registry_url": "http://themes.ketchuphq.com/registry.json"
  }
}
austin@cti:~/work$ ./ketchup start
2017/12/17 13:42:50 listening on 127.0.0.1:9999
2017/12/17 13:42:50 [INFO] done rebuilding router
2017/12/17 13:42:50 [INFO] loading certs from data/tls/*.key
octavore commented 6 years ago

Looks like it's because the version of nagax in this repo was out of date. I've updated it on master now so bindext should work; note that you'll need to run make prepare-vendor again after pulling to sync the new dependencies.

xu4wang commented 6 years ago

Thanks. Confirm fixed.

austin@cti:~/golang/src/github.com/ketchuphq/ketchup$ ./ketchup start
2017/12/17 15:00:30 [INFO] listening on 0.0.0.0:9999
2017/12/17 15:00:30 [INFO] done rebuilding router
2017/12/17 15:00:30 [INFO] loading certs from data/tls/*.key