ap is a program that help regular users to organize and manage their Apache daemons independently of a server that could be managed by root on the machine. This tool was made with the following goals :
- Allow developers to work easily on multiple web sites at once, or on a shared development server
- Permit URL sharing between persons (read : do not mess with DNS/hostnames)
- Prefer simplicity/convention over configuration, but customization should still be possible
- Try to detect automatically technical elements (i.e. project name, path, port)
ap permits to start or stop a Apache daemon for each web site using dedicated configuration files which are stored (by default) in $HOME/etc/apache. A file template is used for the creation of configurations. The resulting files should be as small as possible, focusing on the web site specifics, while the common configurations elements are loaded using the Include function.
- Copy ap into your bin/ directory, make sure that directory is in your PATH.
- Create configuration and logs directories :
mkdir -p ~/etc/apache/{logs,pids}
- Copy the common configuration and template example into ~/etc/apache
- Adjust those files to your distributions if needed
- Go the your project directory
- Create your first configuration :
ap create
- Spawn the Apache daemon :
ap start PROJECTNAME
Include _common.conf
DocumentRoot /home/olivier/Code/psychologue.pro/public
Listen 10000
PidFile /tmp/ap_olivier_psychologue.pro.pid
ErrorLog logs/psychologue.pro_error.log
CustomLog logs/psychologue.pro_access.log vhost_combined
- Zsh and/or Bash completion
This tool was developped while creating the psychologue.pro website.
Copyright © 2011 creativ-IT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.