[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache2: clearing the air [please read]



[I'm not subscribed to -devel, please respect and carry through my
Mail-Followup-To.]

Hi all,
Hopefully sometime this week apache2 will get uploaded. It's 99% done,
but I don't have the time to do any more; it's in thom's capable hands.

It's different. Radically different. As in, your apache modules won't
work under apache2. There's support for apache2 in php4 [Peta, do you
want this? --with-apache2=/usr/sbin/apxs2, with build-depends on
apache2-support and -dev is what you need], and modperl-2.0.
Unfortunately, the latter won't hit any time soon as it needs the latest
perl sources from CVS^Wrsync, which is just pure evil.

It's packaged differently. Very differently. Web pages no longer go
(directly) to /var/www, CGI scripts no longer go to /usr/lib/cgi-bin (at
all), logs don't go to /var/log/apache2. The reason this is true without
violating Debian's FHS is that we've reinterpreted how apache2 does
things. Basically, it considers every single host a virtual host, and it
just happens to have a default virtual host.

Why? Because it's just cleaner. None of the Debian web server packages
have ever had proper support for virtual hosts, and we (myself, Thom,
plus the Debian Apache Taskforce) decided to fix this grave injustice.
apache2 has virtual hosting support right out-of-the-box: just type
a2enhost to create a new virtual host (a2dishost to disable). It also
has better support for modules - a2(en|dis)mod. I won't go into detail,
but, in short, all the modules store their config directives in
/etc/apache2/modules, if they're enabled, they're symlinked to from
/etc/apache2/mods-enabled - thus allowing us to keep everything pristine
and still have an easy way to enable and disable modules. (Module
maintainers: /etc/apache2/modules/foo.load contains ONLY the LoadModule
line, /etc/apache2/modules/foo.conf contains all the module-specific
configuration directives).

The virtual host layout is such:
	* /var/www/the.host.name/htdocs - document root for that host
	* /var/www/the.host.name/cgi-bin - CGI scripts for that host
	* /var/www/the.host.name/logs - logs for that host

/var/www/default will always be a symlink to /var/www/the.host.name.
Well, actually, not always. Since a2(en|dis)(host|mod) were hack-ish sh
pieces of crap, if you delete (or even just disable) the default virtual
host, then the virtual hosts will be loaded by alphabetical order, so
what you think is the default, may not be the default. (Feel free to
rewrite them in PERL and submit them). So, where you'd use /var/www, use
/var/www/default/htdocs. /var/www/default/cgi-bin, instead of
/usr/lib/cgi-bin. /var/www/default/logs, instead of /var/log/apache.
(Bear in mind, though, that apache2 keeps a global error log in
 /var/log/apache2/error.log).

Hm, what else? Not a lot, really. Because of these drastic changes,
apache2 doesn't yet provide webserver, or whatever its name is. Judging
by the activity on debian-apache[1], it looks as if apache will probably
go the same way.

But it's all for the better, trust me.
:) d

(PS: Please don't email me asking me to do anything with apache2 in the
 next 2 months. Suggestions are welcome, but I won't have the time to
 work on them - I have mini-exams every day for the next 4 weeks, then
 full exams for 2 or so weeks after that, hence I'm more or less
 flat-out).

(PPS: apache2 keeps its modules in apache2-modules, not
 libapache2-mod-foo. No particular reason, except that all the main ones
 are together in a bunch, not separated out).

-- 
Daniel Stone						    <daniel@sfarc.net>
<erno> hm. I've lost a machine.. literally _lost_. it responds to ping, it
works completely, I just can't figure out where in my apartment it is.

Attachment: pgpTl1eJGeAbE.pgp
Description: PGP signature


Reply to: