Hacking Swish++
For a while now I'm been getting hacked of with my search functionality. Because for some reason it would refuse to search for "MySQL". The final straw however was when it refused to search for "rsync". When I actually read the man pages I discovered that swish++ by default does not treat words with no vowels as words. Annoyingly changing this could only be done by recompiling. But it did give me an opportunity to bump my installed version to the latest and greatest.
However, I've still not even begun to speculate about the possibility of handling zero results nicely.
Building Apache with Static Modules
I recently had need to trim back an Apache config to disable all the fluff. Specifically I disabled all modules which were not required for the servers normal running, and commented out the related config. For what I need these are the onlt modules I require:
LoadModule access_module libexec/apache2/mod_access.so LoadModule log_config_module libexec/apache2/mod_log_config.so LoadModule env_module libexec/apache2/mod_env.so LoadModule setenvif_module libexec/apache2/mod_setenvif.so LoadModule mime_module libexec/apache2/mod_mime.so LoadModule autoindex_module libexec/apache2/mod_autoindex.so LoadModule dir_module libexec/apache2/mod_dir.so LoadModule alias_module libexec/apache2/mod_alias.so
However, the ultimate Apache optimisation is to statically link modules. Which, last time I investigated, could not be done via the ports. It must have been a long time ago that I did my noodling. Because I notice the other day the ports do now support it. Time to reinvestigate.
cd /usr/ports/www/apache2
The first thing I discovered is that make now has three additional options:
show-options show-modules show-categories
Reading the make show-options suggets this should do the trick:
make WITH_STATIC_MODULES="access log_config env setenvif mime autoindex dir alias" install clean
However, this does not work as I intended. The modules I want static are static. But so are the ones I want dynamic:
/usr/local/sbin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c
Ah, well. Never mind.





