Access development server from different computers?

Dear all,

My development and production server are on the same web server, just different folders.

In my Development, I may did something to enable DebugKit to certain client hosts (2 in my case).
Now I need to test from other hosts, but the app not showing, debugkit not showing. I think DebugKit may be messed up with my HTML global loading block, hence the whole page is in white.

I have tried to read CakePHP documentation to remove DebugKit access restriction, but surprisely, it is not set. I can not remember what I did.
There is no below configure setting at all.

DebugKit.safeTld

Please anyone point me if there is anywhere else that may define my development client to access my CakePHP app ?

Thank you very much.

By default the Debug Kit can be rendered on domains ending with one of the following TLD’s

  • localhost
  • invalid
  • test
  • example
  • local

See debug_kit/ToolbarService.php at 233130f551ad5cf06a543321f8a8039df342768f · cakephp/debug_kit · GitHub

But there are multiple ways how you can enable DebugKit on other TLD’s as well:

The recommended way is to adjust your config/app_local.php to contain:

return [
    // Other arrays containing DB connection, email config etc. 
    'DebugKit' => [
        'safeTld' => ['cc']
    ],
];

This would allow any domain ending with cc like https://test.mydomain.cc to use Debug Kit. Depending on what your TLD is you will need to adjust that config.

But you can also force enable it via

return [
    // Other arrays containing DB connection, email config etc. 
    'DebugKit' => [
        'forceEnable' => true
    ],
];

which I would not recommend.

But if you get a completely white page/no HTML at all then I would check your webservers error.log or the logs/error.log file inside CakePHP - depending on what error you have.

1 Like