Craig Sanders: poll: package my vhosting system for debian?
There was a discussion today on the LUV-main mailing list about apache virtual hosting. Someone suggested mod_vhost_alias which is OK for a simple solution, but pretty limited.
IMO, there are much better ways of doing it. Specifically, generating config fragments for each virtual host.
I wrote such a system years ago, and have always thought “I should package it up for debian”. There’s a moderate amount of work involved in doing so, and probably an even larger amount of support work afterwards. Worst of all, I’d have to write - or con someone else into writing - documentation for it (it’s easy enough to use that you can be SHOWN how to use it in 10 minutes, but that isn’t good enough for a distributed package).
I guess the point of this blog post is to find out if there’s sufficient interest to make it worth the effort. Feel free to comment or email me about it.
If anyone wants to look at the code, i can tar it up easily enough, and even write some simple/minimalist instructions.
anyway, here’s (a slightly edited version of) what i posted to LUV-main:
Preamble
I looked into apache’s mod_vhost stuff years ago, but IMO it’s just too inflexible and limited to be of much use. It’s fine if ALL your vhosts are identical…but not if you need different settings on some or all of them. As soon as you need a custom setting for one vhost, you have to step outside mod_vhost_alias and roll-your-own anyway. which means you now have two different methods of configuring your vhosts.
Instead, I’ve used my own vhosting system for years (long before mod_vhost), on dozens of servers…the largest of which had over 500 vhosts on it - the biggest problem was the enormous number of file handles the apache processes needed for log files.
After tweaking the kernel file-max etc limits, it actually worked without problem but I always intended to rewrite that bit of it to use a log splitter daemon, perhaps vlogger or similar. Unfortunately, I a) left that job before I had time to implement it, and b) never did figure out a good way to handle the error logs because apache doesn’t prefix the vhost name to ErrorLog output like it does for CustomLog outout (best compromise was to just have one combined error log rather than one per vhost….most web programmers/website operators never look at the error logs anyway. Personally, I find it invaluable, most people don’t even seem to think of looking at it)
Synopsis of Operation
1. Creating a new vhost is a 3-step operation:
- create a user (with adduser), optionally with a postgres or mysql account of the same name.
- edit /etc/virtuals/virtual-hosts.conf, copy/paste/edit one line
- run “make”
Lessons learned today:
New QA website
I modified
For a university seminar I m currently writing a GUI program to view
One week ago, I went to a branch office of
Note that it's not compiled into the default build, so you have to change a property from 0 to 1 and recompile, and...being new there might be some issues, but still, it's nice to have that to let people play around with simple "web service" type things that use XML. Of course, another strategy might be to have a 'proxy' server that fetches the actual XML, and returns a tagged Hecl list so that Hecl can parse it directly, but that requires a server and has more overhead.
In the last leg of what has been
Sometimes, companies come up with the most stupid restrictions. And
unfortunately, other companies enable them to do that.In this particular case, the DHL parcel service and Acrobat teamed up:
You can buy and print shipping labels online with DHL. I thought I'd give that
a try, especially since there is a 24h dropbox nearby.The label can be printed either using a Java applet or a PDF file. It thought
PDF - sounds great. But it isn't. It's a very special PDF file. It has a
scriped printing button that will print with the default settings (so it comes
out at a completely different printer that I would have wanted to print it).
In fact I would have expected the printing dialog to come up, and thought the
button had not functioned at all. Also I could probably not have used it if I
had opened the PDF file in a different PDF viewer. At my own laptop I might not
even have Adobe Reader anymore - I use Evince. It's faster and has a much
better UI. But I don't have a printer, so I used a computer at the university
which used Acrobat by default, fortunately.And: you may only print the real shipping label once. Only 'sample'
labels can be printed arbitrarily often. This is counted on the server side,
btw., and also applies to the Java applet.Apparently you also must not rename the PDF file (WTF?) and you need to be
online to print the file. So you can't save the PDF file and take it to an
offline computer that does have a printer...Dear DHL: have you heard of that ancient technology called 'Photocopiers',
sometimes also dubbed 'Xerox'? You know... lots of people still have these.
Heck, I figure I could even use Adobe Reader to print the label into another
PDF file with the print restrictions removed...So you gain nothing by preventing multiple printouts, but you can
seriously annoy users (e.g. when their printer malfunctions)Please stop imposing such stupid restrictions on users.
A few news from the campaign of NMU's targeted at bringing po-debconf
translation ratio as high as possible for as many languages as
possible (and also improve packaging quality quite significantly on many loosely maintained packages).
simple case
Imagine a very simple debian/rules, that should work for most packages w/o
modification: