Webapp-Config

From Research
Revision as of 16:52, 4 December 2008 by Gordp (talk | contribs) (New page: Under Gentoo, installing a typcial web application is actually a two-step process: <br> 1) you '''emerge''' the application, which typically installs the app under '''/usr/share/webapps/'...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Under Gentoo, installing a typcial web application is actually a two-step process:
1) you emerge the application, which typically installs the app under /usr/share/webapps/<pkg_name>
2) you then perform a second-stage installation to your web-server doc-root, using webapp-config

Why? To support virtual-hosting, and multiple sites being served from a given host, where they may each require different package-versions. Here's how:

First, we have the configuration-file /etc/vhosts/webapp-config, which lets us specify the vhost-root (often simply /var/www/<hostname>, but sometimes /srv/www/<hostname>. The localhost will be different in the case where we actually use vhosts, which isn't too common for us; we tend to prefer individual, dedicated vserver-guests, with single-site web-serving in each).

Typical settings within the /etc/vhosts/webapp-config file:

vhost_root="/var/www/${vhost_hostname}"
vhost_hostname="localhost"
vhost_server="apache"


These commands will install apps under /var/www/localhost/htdocs/<pkg_name>, with the specific version mentioned at the end of command-line:

webapp-config -I -h localhost -d /mediawiki  mediawiki 1.8.5
webapp-config -I -h localhost -d /gallery  gallery 2.2.3
webapp-config -I -h localhost -d /awstats awstats 6.5-r1


Commands to upgrade (typical):

webapp-config -U -d /gallery  gallery 2.2.5
webapp-config -U -d /mediawiki mediawiki 1.11.2
webapp-config -U -d /awstats awstats 6.7-r2