webroot for macports

Jeremy Lavergne jeremy at lavergne.gotdns.org
Tue May 4 22:40:53 PDT 2010


>> I think most of the worrying and planning of the layout out can be overcome by mimicking Ubuntu (they've figured out most if not all of this).  Basically a package will link in its specific apache configuration (perhaps from /usr/share/${name}) into mods-available/ and then will be linked into mods-enabled/ when activated.
> 
> Do you have a recursive directory listing of this so I can see what this method looks like.  I guess I am looking for a listing of the setup post installation of a few things, say phpMyAdmin and a webmail of some form.


Before I get started I've got a clarification:  the apache configuration for a given package is supplied in /etc/${name}, it just happens to also be linked into /usr/share/${name} in the package i was using.  the web pages/libraries that are used still reside in /usr/share/${name}.  The apache manual was done this way (alias of /manual pointed to somewhere outside the webroot).


Right. You have this standard layout in /etc/apache/:
conf.d/
mods-available/
mods-enabled/
sites-available/
sites-enabled/

Here's how it basically works:
/etc/apache2/conf.d contains symlinks to any configuration files to apply server-wide
/etc/apache2/mods-available contains symlinks to any modules that are available, linked into mods-enabled when used (apache's config is set to load everything in the *-enabled directories)

If you want to do virtualhost-based modules then for a given host config you use "include" for a given package's configuration.

An apache config for a given package will likely include two key components:
Alias /${name} /usr/share/${name}
<Directory /usr/share/${name}>...</Directory>

Possible MacPorts example of this:
install package into ${prefix}/share/${name}/
install apache configuration into ${prefix}/etc/${name}/
symlink configuration into ${web_dir}/conf.d  (or we can use a macports-based localhost vhost)
port unload ${web_app}
port load ${web_app}

Since ${web_app} and ${web_dir} would ideally point to whatever is used, this would also work with an Apple-supplied system for phpmyadmin and squirrelmail.  Notice this isn't about installing php5-* ;-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2435 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20100505/5bffdbcd/attachment-0001.bin>


More information about the macports-dev mailing list