public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Robin H.Johnson <robbat2@gentoo.org>
To: gentoo-dev@gentoo.org
Cc: Stuart Herbert <stuart@gentoo.org>, Donny Davies <woodchip@gentoo.org>
Subject: Re: [gentoo-dev] [GLEP] Web Application Installation. Plotting a VHOST config tool.
Date: Tue, 5 Aug 2003 21:37:41 -0700	[thread overview]
Message-ID: <20030806043741.GF27029@cherenkov.orbis-terrarum.net> (raw)
In-Reply-To: <200308060344.47919.stuart@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 5071 bytes --]

On Wed, Aug 06, 2003 at 03:44:44AM +0100, Stuart Herbert wrote:
Content-Description: signed data
> On Wednesday 06 August 2003 3:16 am, Robin H.Johnson wrote:
> > Where do you see -vhosts fiting into having multiple instances of a
> > webapp on a single host ?
> 
> Personally, I don't.  If you want multiple instances of a webapp on a single 
> host, the webapps need to be installed with +vhosts.
> 
> -vhosts would be strictly single copy single domain scenario.
Ok, so if -vhosts, we install to /usr/share/webapp/(whatever) and
automatically run the webapp-config tool ?

if +vhosts, we install to /usr/share/webapp/(whatever) and the
administrator is left to run the rest himself.

> > > Btw, talked to Woodchip on IRC tonight, and he seemed happy enough
> > > with us moving the default -vhosts DocRoot from /home/httpd.  So I'm
> > > gonna strongly advocate that the default -vhosts DocRoot moves to
> > > /var/www/localhost/public_html in the near future.
> > Sounds good.
As part of the planning, and a good first step
I'm plotting out a config tool for adding vhosts. All comments welcome
as this is intended to be a good outline of what the tool must do etc
before I write it (borrowing heavily from my exist custom scripts for
the purpose).

Stuart: once before you asked why I didn't use dynamic vhosts.
Two reasons behind it. Firstly, I want seperate log files for each
vhost, and secondly I have a lot of apache configuration directives that
vary per server (funky mod_rewrite stuff mainly to make variable
handling in php interesting). Based on this, I strongly believe that
'simple' vhosts are the best way to go in general.

Looking at the current /home/httpd:
We have:
htdocs cgi-bin error icon

All of these can go into the the /var/www/localhost/ quite easily.

/var/www/<vhost>/{error,icon} symlink back to the default host usually
(anybody wanting to use them changes them as needed).

I feel the name 'htdocs' belies the meaning of the directory more
accurately, but I'm looking for input on that item.

In my personal setup, I have:
/etc/apache2/conf/vhosts/${FQDN#*.}/${FQDN}
/var/www/${FQDN#*.}/${FQDN}/{htdocs,cgi-bin}
/var/log/apache2/${FQDN#*.}/${FQDN}/
Then I do:
"include /etc/apache2/conf/vhosts/" in my main apache config :-).

But I don't think we really need a hashed setup do we? make it a config
option because I don't know who will want it.

Rough outline of tool:

vhost-config must do three things:
- creates directories (copies a skeleton directory for the most part).
- create apache vhost config files.
- HUP apache so it reads in the new config without stopping.

Proposed rough usage:
vhost-config [opts] fully.qualified-domain.name

opts:
-s server
which server to use this with, defaults to apache, mostly a moot point
until more virtual/httpd exists.
-u owner 
user owner of all files, defaults root for security.
-g group
group owner of all files, defaults to root for security.
-p perms
initial permissions, defaults to 644 (OR'd with 111 for directories).
-G
shortcut for having group writable permissions (effective does OR 020).
-i 
symlink /var/www/localhost/icons to provide icons. (default)
-I [dir]
copies /var/www/localhost/icons to a new directory. Optionally provides
a different directory to take them from.
-e 
symlink /var/www/localhost/error to provide error pages. (default)
-E [dir]
copies /var/www/localhost/error to a new directory. Optionally provides
a different directory to take them from.
-k directory
specify a different skeleton directory (defaults to /etc/vhost-skel/)
-H
HUP apache on completion if everything is good to go.
-h
don't HUP apache at all.
-f file
path to alternative config file (default is /etc/vhost-config.conf).

/etc/vhost-skel/ might contain:
htdocs/ = maybe a simple index.html ?
cgi-bin/ = empty 
icons/ = symlink to /var/www/localhost/icons
error/ = symlink to /var/www/localhost/error
conf/ = [treated specially] ${server}.conf that is used for creating the initial config,
templates of some sort (I'm leaning to M4 as all my existing stuff is in
it, and it's good for templating like this).

After vhost-config has generated all of the nessicary stuff, it should
HUP the apache server if everything is in order.

There is one check that is outside the scope of the tool, namely the
existance of DNS for the specified hostname. If the admin creates a
vhost that does not yet have DNS or name resolution relative to the
system, we should display a warning.

I'd repeat again for good measure, this email is strongly based off the
present capabilites of my private vhost setup scripts, plus the features
I as a developer, sysadmin and user want in a new revision. However I
strongly feel that more input is needed as well.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2003-08-06  4:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 23:16 [gentoo-dev] [GLEP] Web Application Installation Max Kalika
2003-08-05  0:14 ` Stuart Herbert
2003-08-05  2:30   ` Donny Davies
2003-08-05 10:12     ` Stuart Herbert
2003-08-06  4:01       ` Donny Davies
2003-08-05  3:04   ` Max Kalika
2003-08-05 10:39     ` Stuart Herbert
2003-08-05  9:34   ` Paul de Vrieze
2003-08-05 11:19     ` Stuart Herbert
2003-08-05 11:37       ` Paul de Vrieze
2003-08-05 21:00       ` Max Kalika
2003-08-05 23:43         ` Cal Evans
2003-08-06  1:54           ` Stuart Herbert
2003-08-06  2:16             ` Robin H.Johnson
2003-08-06  2:44               ` Stuart Herbert
2003-08-06  4:37                 ` Robin H.Johnson [this message]
2003-08-06 12:48                   ` [gentoo-dev] [GLEP] Web Application Installation. Plotting a VHOST config tool Stuart Herbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030806043741.GF27029@cherenkov.orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --cc=gentoo-dev@gentoo.org \
    --cc=stuart@gentoo.org \
    --cc=woodchip@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox