webroot for macports
Ryan Schmidt
ryandesign at macports.org
Mon Apr 26 16:02:30 PDT 2010
On Apr 26, 2010, at 16:34, Rainer Müller wrote:
> I would prefer ${prefix}/var/www.
According to "man porthier" we already decided on ${prefix}/www but if you want it changed I don't care one way or the other.
> But do we really need to have this
> configurable? Wouldn't it be enough that all web server ports and web
> application ports use the same path?
That was my thought as well. After all, we don't have or need variables for ${prefix}/include or ${prefix}/lib; ports just know that's where things go.
The real question about a webroot is what the document root should be. The document root absolutely *cannot* be ${prefix}/www because ${prefix}/www will contain the directory cgi-bin and probably other directories that should not be served directly by the web server. Therefore, the document root should be ${prefix}/www/htdocs (Apache naming) or ${prefix}/www/public (ZendFramework naming) or something else that we can agree on.
The next matter of discussion is where web app ports (e.g. phpmyadmin) should install their contents. You might argue they should install into the document root, but I would say they should install outside the document root and symlink the relevant part of themselves into the document root. Not all web apps do this, but some of the better-designed web apps are designed not to have their main directory served up by the web server; only a specific subdirectory should be directly accessible to the web server and it would be wrong to install such ports completely inside the document root.
I would like there to be a web app portgroup which encapsulates some of whatever the behavior is that we decide on here. But there are certainly several things web app ports have in common -- not needing to configure or build, just needing to copy a set of files to a known place, needing a dependency on a web server (but not specifically apache), etc.
More information about the macports-dev
mailing list