I work at a web shop where we do a lot of WordPress sites, but over the past couple of years, I’ve been developing some rails applications, learning the ways of local development and whatnot. The sheer convenience of changing into a directory and running rails server has left me wanting for a similar solution for my Apache / PHP development workflow. Does anyone know of a solution to quickly and easily launch an Apache (or nginx, or lighttpd) / PHP server from the working directory, or am I stuck configuring something myself to watch a certain directory? I’ve used MAMP in the past but it’s not quite what I’m looking for. I’ve also looked into Vagrant, but it seems to be more trouble than it’s worth.
Sorry if I’m not making sense here, I don’t even know if it’s technically feasible, just wondering if anyone is looking for something similar.
There are a few solutions:
ScriptAliasorScriptAliasMatchin the conf file too. This does not convert a directory, but it can let you do a more verbose redirect.Virtual host example (be sure to add
127.0.0.1 myserver.localto/etc/hosts):