Difference between revisions of "Apache2Adaptor"

From GNUstepWiki
Jump to navigation Jump to search
 
Line 24: Line 24:
  
 
Your application should be reachable at http://www.example.com/wo/appname.woa/
 
Your application should be reachable at http://www.example.com/wo/appname.woa/
 +
 +
==== Accessing WO 5 Applications via our Adaptor ====
 +
 +
App Name=HelloWorld Instance=1 Host= 10.1.0.99:4711
 +
RewriteEngine On
 +
RewriteRule ^/cgi-bin/WebObjects/HelloWorld.woa/(.*)$ /wo/HelloWorld.woa/$1 [L,PT,QSA]
 +
 +
Start your HelloWorld like this
 +
 +
./dist/selfcontained/HelloWorld.woa/HelloWorld -WOPort 4711
 +
 +
This will show you the Java HelloWorld if you point your browser to http://www.example.com/cgi-bin/WebObjects/HelloWorld.woa/
  
 
== Notes ==
 
== Notes ==

Latest revision as of 20:10, 1 December 2007

Introduction

After you have created a GNUstepWeb application, you might want to deploy it. The Apache 2 adaptor is a module that loads into your apache server. If somebody asks your web server for a dynamic web page it will forward the request to the appropriate application instance.


Configuration

The main difference between the older adaptors and the new one for Apache2 is that all configuration is done per virtual host context. In addition, no special config file is nessesary. All can go into httpd.conf.

ShowApps on will dump a list of configured applications.

ShowApps off hides that list.

App Name=appname Instance=instancenumber Host=IP or Hostname:port


Example

ShowApps on
App Name=TCWebMail Instance=1 Host=10.1.0.1:9901
App Name=PBX Instance=1 Host=127.0.0.1:9001

Your application should be reachable at http://www.example.com/wo/appname.woa/

Accessing WO 5 Applications via our Adaptor

App Name=HelloWorld Instance=1 Host= 10.1.0.99:4711
RewriteEngine On 
RewriteRule ^/cgi-bin/WebObjects/HelloWorld.woa/(.*)$ /wo/HelloWorld.woa/$1 [L,PT,QSA]

Start your HelloWorld like this

./dist/selfcontained/HelloWorld.woa/HelloWorld -WOPort 4711

This will show you the Java HelloWorld if you point your browser to http://www.example.com/cgi-bin/WebObjects/HelloWorld.woa/

Notes

If the adaptor receives an request it cannot forward to the requested application, it will list the configured applications if ShowApps on was configured. Otherwise just a useless page is displayed.

This adaptor was written from scratch, based on Apache2 example code. It does not require any additional libraries or frameworks other than GSWeb and Apache2. It does not need libProplist.