Resin with Apache on UnixInstallationTo configure Resin with Apache, you must follow the following steps:. 1 Compiling Apache2 Compile mod_caucho.so3 Configure Apache4 Set up environment5 Configure resin.conf6 Restart Apache and start srunCompiling ApacheYou need a version of Apache..... with DSO support enabled. Apache has full documentation attheir website. To check if your apache has DSO support, you can check for mod_so.c in youryour httpdchecking apache httpd for mod_so.cunix> / usr / local / apache / bin / httpd -lCompiled -in modules:. ... mod_so.c ... Many distributions, eg Red Hat Linux, will have Apache preinstalled However, because thestandard distribution has files all over the place, some people prefer to recompile Apache fromscratch.Once you untar Apache , build it like: unix> ./configure --prefix = / usr / local / apache / - enable-module = sounix> makeunix> make installSolaris versions of Apache may need additional flags, otherwise you'll get some linking errorswhen trying To load resin. You ma y need to refer to the Apache documentation if you get linkingerrors Here's an example configuration on Solaris:. unix> ./configure --prefix = / usr / local / apache / - enable-rule = SHARED_CORE / - enable-rule = SHARED_CHAIN / - enable-module = so / Resin 3.0 Installation -.. p 14Copyright (c) 1998-2004 Caucho Technology All rights reserved- 14 --- enable-module = most / - enable-shared = maxCompiling mod_caucho.soTo Compile and install mod_caucho on unix, you'll nesed to run resin '
s configure and thenmake. This step will create mod_caucho.so and put it in the Apache module directory. Usually, mod_caucho.so will end up in /usr/local/apache/libexec/mod_caucho.so.If you know where your apxs executable is, you can use --with-apxs. apxs is a little Perl scriptthat the Apache configuration makes. It lets modules like Resin know how all the Apachedirectories are configured. It is generally in / usr / local / apache / bin / apxs or / usr / sbin / apxs. IT'SUSUALLY Easiest to use --with-apxs so you do't need to worry where all the apache directoriesare.unix> ./configure --with-apxs = / usr / local / apache / Bin / apxsunix> MakeEven if you don't know, the configure script can offten Find It: UNIX> ./configure --with-apxsunix> makeas an alternative to --with-apxs, if you've compiled apache yourself, or if you have a simpleconfiguration, you can generally just point to the Apache directory: unix> ./configure --with-apache = / usr / local / apacheunix> makeunix> make installThe previous --with- apxs or --with-apache should cover most configurations. For some unusualconfigurations, you can have finer control over each directory with the following arguments to./configure. In general, you should use --with-apache or --with-apxs , but the other variables arethere if you know what you're doing .-- with-apache = dir The Apache root directory .-- with-apxs = apxs Pointer to the Apache extension script - with-apache-include = dir The Apache include Directory - with-apache-libexec = dir the apache module Directory - with-apache-conf =
httpd.conf The Apache config fileConfigure the EnvironmentResin 3.0 Installation -.. p 15Copyright (c) 1998-2004 Caucho Technology All rights reserved- 15 -If you do not already have Java installed, you'll need to download a JDK and set someenvironment variables.Here's a typical environment that you might put in ~ / .profile or / etc / profile # Java LocationJAVA_HOME = /
Rights reserved.starting resin on mon, 04 AUG 2003 09:43:39 -0700 (PDT) [09: 43: 40.664] HTTP Listening to *: 8080 [09: 43: 40.664] ServletServer [] StartingResin 3.0 Installation - p. 16copyright (c) 1998-2004 Caucho Technolog. All Rights Reserved- 16- [09: 43: 40.879] HMUX Listening to *: 6802 [09: 43: 41.073] Host [] Starting [09: 43: 41.446] Application [http:// localhost: 8080 / rate - doc] Starting [http: // localhost: 8080] StartingResin Will Print Every Port It's Listening To. in The Above Example, Resin Is Listening To Port 8080using HTTP and 6802 using its servlet runner protocol. In other words, mod_caucho canconnect to Resin with 6802 only on same host, but you can browse port 8080 from any host.The following snippet shows the
4Configuring Apache by handMaking mod_caucho will automatically change your httpd.conf file. You can also configureApache directly, instead of letting mod_caucho read the configuration from the resin.conf file. Ifyou use this method, you need to make sure you match the Apache configuration with the Resinconfiguration.httpd.confLoadModule caucho_module libexec / mod_caucho.soResin 3.0 Installation -. p 17Copyright (c) 1998-2004 Caucho Technology All rights reserved- 17 -.
re using a single JVM, you onlyneed to configure the resin.conf If you want a different JVM for each virtual host, yourhttpd.conf can load a different resin.conf for each JVM: httpd.confResin 3.0 Installation - p 18Copyright (.. . c) 1998-2004 Caucho Technology All rights reserved- 18 -