Troubleshooting

On this page

Most problems come down to a port another app holds, a .test name that isn't resolving, or a certificate that isn't trusted yet. Each section below says how to tell which, and what to do.

A .test address doesn't load

  1. Check that Short Leash is running: the power rail at the top of the window should be lit. A red DNS lamp means Short Leash's DNS server couldn't open its port; the rail says which one. Quit the program using it (sudo lsof -nP -iUDP:5354 names it), then restart Short Leash.

  2. Check the name resolves to 127.0.0.1:

    Terminal window
    dscacheutil -q host -a name shop.test
    

    If it doesn't, check that /etc/resolver/test exists and contains port 5354. If another tool replaced it, choose Settings › Remove › Remove system changes…, then reopen Short Leash to run setup again.

  3. Check the site is listed on the Sites screen. Folder names become lowercase, and anything other than letters and digits becomes -: My App.v2 is served at my-app-v2.test.

Port 80 or 443 is taken

Setup names the program holding the port. Quit that program (another local web server, a container, or another local development app), then choose Check again. Short Leash never stops other programs for you.

To see it yourself:

Terminal window
sudo lsof -nP -iTCP:443 -sTCP:LISTEN

The browser says the certificate isn't trusted

Open Keychain Access, find Short Leash Local CA in the login keychain, and set it to Always Trust. Firefox uses the system's trusted certificates on macOS by default; if you turned that off, import the certificate from leash ca.

For command-line tools, see HTTPS.

A service won't start

Open Logs and pick the service. The usual cause is the port: if another copy of MySQL or PostgreSQL is running, quit it or give the Short Leash service another port on the Services screen.

The wrong php runs in my terminal

which php shows which one runs. If it isn't in ~/Library/Application Support/Short Leash/bin, another line in ~/.zshrc puts a different PHP first. See Terminal. leash php always uses Short Leash's PHP.

PHP can't reach another .test site

PHP's built-in cURL resolves names its own way and doesn't see the .test resolver, so curl_init('https://api.test') fails with "Could not resolve host". Laravel's HTTP client (Http::get(...)) works anyway while Laravel details is on (Dumps screen): Short Leash points it at 127.0.0.1 for every site. For other clients, connect to 127.0.0.1 and send the site's name, for example with cURL's CURLOPT_RESOLVE set to ['api.test:443:127.0.0.1'].

A shared site is blank or redirects to .test

Your app may build absolute URLs from a configured address rather than the request. For Laravel, don't hard-code APP_URL into asset URLs, and trust proxies (TrustProxies with at: '*'). Short Leash already sends the public host and https to PHP.

php artisan storage:link makes public/storage a link to storage/app/public. Some drives can't hold links, such as a folder a virtual machine shares from the computer it runs on (Parallels' C:\Mac\Home on Windows). Laravel still says the link is connected, so Short Leash checks for it and shows what Laravel printed when it isn't there. Check that public is writable and that config/filesystems.php still links public/storage; on a shared folder, move the project to a folder on the machine's own drive and use Link storage again.

Report a problem

See Support for what to include.