VirtualHost handling in apache2 Port

William Siegrist wsiegrist at apple.com
Thu Mar 25 09:41:26 PDT 2010


On Mar 25, 2010, at 8:44 AM, Rodney Rehm / Medialize.de wrote:

> Hi there,
> 
> this proposal regards "website" Ports such as phpmyadmin (and many others) which could be run from their own virtual host.
> On my development machine I run all those things (eg. phpmyadmin, phppgadmin, xhprof-UI) in their own space, say phpmyadmin.dev, phppgaadmin.dev, and so on.
> 
> It would be nice if `port install phpmyadmin +apache2vhost` would
> 1) add a dependency to apache2

It already indirectly depends on apache2 through php5.

> 2) create a vhost for phpmyadmin using a (pre-configured) domain scheme (e.g. "${portname}.dev" or "${portname}.localhost")
> 3) register "${portname}.dev" for localhost in /etc/hosts
> 

I personally would not want MacPorts touching /etc/hosts


> The apache2 port would have to be extended by a vhosts variant, that would create ${prefix}/apache2/vhosts and patch httpd.conf to use vhosts and include them from ${prefix}/apache2/vhosts/*.conf - then all other Ports would have a central space for putting their virtual hosts. If you're concerned about security, you can have the ports create their vhosts disabled by default (*.conf.disabled).


Having a place to drop port-specific configs seems like a good idea to me in general.


-Bill


More information about the macports-dev mailing list