I want to be able to start an apache server from the command line, typing something like apache site-folder
or apache . --port=2000
This sh
For the benefit of anyone stumbling across this with the same question, I wanted something that was as simple as the pache package mentioned, but not relying on having node.js installed.
My use-case was in looking for a replacement for the webrick server used in Jekyll. Webrick, like most lightweight run-anywhere http servers, doesn't support .htaccess files.
So I took gpilotino's answer and packaged it up a bit. I've been using it for a few weeks now and although I am sure it can be improved upon it's doing the job. It comes as a script and a minimal httpd.conf file, which makes it easy to extend to support, say, PHP.
You can find it at: https://github.com/julianbrowne/apache-anywhere
Essentially, once it's installed (an optionally config tweaked) you just run:
apache -d document_root_directory -p {port}
and:
apache stop {port}
when you are done.