VirtualHost handling in apache2 Port
Scott Haneda
talklists at newgeo.com
Thu Mar 25 10:38:43 PDT 2010
On Mar 25, 2010, at 8:44 AM, Rodney Rehm / Medialize.de wrote:
> It would be nice if `port install phpmyadmin +apache2vhost` would
> 1) add a dependency to apache2
It depends on php, which depends on apache, which I believe is an indirect dependency isn't it?
> 2) create a vhost for phpmyadmin using a (pre-configured) domain scheme (e.g. "${portname}.dev" or "${portname}.localhost")
I do this manually now, but having it already set up for me would be nice. Paths and such may become complicated to deal with. Apache2 has a trac note to work on the layout of it, I would suggest that at the time that ticket gets some work, that this discussion be branched or brought into the main discussion. It seems an appropriate time and place for it to happen.
> 3) register "${portname}.dev" for localhost in /etc/hosts
Count me out of this suggestion. You could include a note, will a command of echo "hostname 1.2.3.4 >> /etc/hosts" but that is about as far as I would ever want that to go.
> 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).
This is exactly where I stuff things now. I enable the .conf include in httpd.conf to the vhosts directory. Anything I drop in there that ends in .conf becomes something I can work with.
I probably would lean on leaving them out of the directory and keeping them in with the other "samples" and also follow that convention. Meaning, the name of the file would be *.conf.sample
> Is this something worth considering to you, or should I go play in my own backyard again?
I like the idea of having the conf files included. At the same time, phpmyadmin has become so dead simple to install, I often wonder if we are not adding confusion by even having a port for it. As it is now, installation outside of ports is as simple as download, unpack, move to a http accessible location, edit and rename conf file to add a secret hash, load the url.
Those that want it connected to a certain host, like for me, I use http://phpma, seems like since /etc/hosts needs editing, or adding with `dscl`, it seems a bit too outside of the areas MacPorts generally is specified to work in.
Again, I would probably try to get involved at about the time this ticket starts to see momentum:
http://trac.macports.org/ticket/21315
--
Scott * If you contact me off list replace talklists@ with scott@ *
More information about the macports-dev
mailing list