webroot for macports

Ryan Schmidt ryandesign at macports.org
Mon May 3 19:20:59 PDT 2010


On Apr 26, 2010, at 18:33, Rainer Müller wrote:

> On 2010-04-27 01:02 , Ryan Schmidt 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.
> 
> How about ${prefix}/www/default so people can set up customized vhosts
> like ${prefix}/www/foobar?

Well, sure, people might want to set up custom vhosts, and they could do that anywhere. Thus far MacPorts hasn't provided any specific guidance on that.

I'm still a little worried about mixing the directories for vhosts with the directories for webapps with the cgi-bin directory. What would you think of being more deliberate in the separation, for example like this:


${prefix}/
	www/
		apps/
			ZendFramework/
			mediawiki/
			phpmyadmin/
		cgi-bin/
			printenv
		vhosts/
			default/
				index.html
				mediawiki -> ${prefix}/www/apps/mediawiki
				phpmyadmin -> ${prefix}/www/apps/phpmyadmin


"apps" may not be the right word since ZendFramework is not an app; it's a framework.

It's also possible users would expect a cgi-bin directory per vhost, which would mean a different layout. I'm not sure what users expect from a cgi-bin directory these days, really; it's become an anachronism.

There are so many ways a web server could be set up, and I think we have to be careful not to dictate too much of that to the user. Though if we can make it so that a web app port works immediately after installation for users not wanting a great deal of web server customization, that's good.




More information about the macports-dev mailing list