Server talking, talking server talk… reprise… (2)
Okay – we’ve had a bit of a glitch today; but better late than never… onto meddling with the server. Currently we have tomcat 5 and nothing else running and we seem to have a healthy CPU situation. However, this is a physical box… so what is going to happen when we throw IIS or Apache into the situation? Well, let’s start with apache as I’ve just downloaded that and am raring to do an apache install on a windows production box… I know, I know – not so long ago this would have been frowned upon – but today… well… let’s give it a whirl and see what happens eh?
(installing apache 2.2.8 – using the msi windows installer with openssl)
so – first an install; Like tomcat I’m installing it into the C:\Apache\ folder ; I’m including all the headers and things (to allow other modules to link in – it might be handy – if not – I can always delete them later)
Making it available to all users on port 80 (or just the current user on 8080 – which seems to be already taken – meaning that the tomcat installation has to been shifted onto a different port; in this case 9090 (it doesn’t matter too much about this; ) – moments later – we have an install in place. Brilliant.
Now how to link the apache installation to tomcat ?
There are two methods we currently employ – one being through the mod_jk connectors (as per the IIS install) the other being through apache acting as a proxy. The former is always the preferred; but we’ll see what happens now.
A quick installation check; what do we have?
Okay – in the /modules subdirectory we have 67 modules… do we need all these modules? We might do? Who knows? Well – I would say – as this is going to be a “front facing server install” we’ll see what we need (so that’s the common ones – mod proxy, mod rewrite, mod openss yadda yadda yadda; and a few odds and sods – whatever apache considers “it’s essential core” :) – I’ll have to check… by default, apache’s httpd.conf has the following included
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
(yeah, I know, I was saying all that in parenthesis; and I know I was being lazy – oh cut and paste – my typing fingers are in your debt!!))
One of the things I dislike about the “default” apache setup, is it’s use of conditionals – “if this, if that, if the other”… I do so prefer to explicitly state “load this module, use this rule” – but that’s me; each to their own :)
Reading through the “Using apache with windows” page there are a few oddities to be aware of, not least that meddling with the httpd.conf file when the service is running could lead to issues (as, due to way apache/windows works, it has a single parent process and a child process, which, on creation re-reads the httpd.conf (without needing a(n apache) server restart)!); Apache can, it seem, load isapi modules (yay! (or nay,yay)) but cannot load filters (“mod_isapi” notes)… hmm… I’d better check how it does the aj13 connector to tomcat… ah… no worries – from the notes on the “ftp/apache/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.26/” folder on your selected mirror :
mod_jk-1.2.26-apache-2.2.4.so is for Apache 2.2, and works with Apache 2.2.4 and later.
Rename to mod_jk.so before putting it in your
phew. I was worried there :)
I’ll continue this thought tomorrow I think – it’s almost 5 already! Where does the time go (and why am I never invited :) ?)