Skip to content

Instantly share code, notes, and snippets.

View marekdedic's full-sized avatar

Marek Dědič marekdedic

View GitHub Profile

Setting up a nice php dev on localhost

This guide was written mainly for myself, as not to forget all the little things and not google all the answers again. But of course anyone can use the guide to get a few pointers and ideas to improve their local developement stack. Note that most of the commands here have to be run with elevated permissions, so I omitted writing sudo of # in front of everything.

I am of course not responsible for breaking your system. Make sure you understand what you are doing, common sense etc.

DNS resolving for different .dev/.test domains

When working on multiple projects at once, it is often practical to not have them all on the same domain. Entering localhost/foo or localhost/bar to switch can work, but sometimes integrations with frontend can lead to problems with relative paths. Sometimes you also need to parse domain names and/or paths and as most of your applications will run in the webroot I found it easier to just write foo.dev or bar.dev into the addre