webroot for macports

Ryan Schmidt ryandesign at macports.org
Mon May 3 19:07:52 PDT 2010


On Apr 26, 2010, at 20:20, Jeremy Lavergne wrote:

>> 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.
> ...
>> 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.
> 
> We could create two portgroups to handle this: www-apache and www-zend.  If there are others then we can easily extend it from there.  We could also make them one portgroup should they provide common functionality.

We don't need two portgroups, or one portgroup offering both locations. I was just mentioning two possible document root naming schemes we could use. I'm sure we could think of others as well. We just need to decide which one we want to use, and use it consistently everywhere.

>> 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 think they should install themselves to /usr/share/${name}[/...]  and then link the relevant portions into the web directory.  I believe this is how most do it nowadays (looking at a common squirrelmail setup right this moment).

Can you point me to documentation supporting this?

Storing web files in share feels weird to me but if that's what everyone's doing now we can do it too. I'd just like to see for certain that others are actually doing this.



More information about the macports-dev mailing list