Apache DSO
The ability to write Dynamic Shared Object (DSO) for the apache webserver is one of the
outstanding features of the Kylix Server Version.
The first steps might be a bit tough for those coming from Windows. First the apache
server has to be recompiled to support the DSO. This information is spread over
several files.
preparations
- For the ease of use I recommend to have at least 4 desktops installed.
One for kylix, two for kruiser - a file explorer plus one or more spare.
- On KDE I'm logged in as standard (WinNT-) user.
It proved unhealthy the be root and run Kylix
- It is handy to be logged in on a Console : CtrlAlt F1, or so as root.
Have 'mc', a norton commander clone running there. It allows fixing accessrights
on the fly.
- Start Kylix and open the project HelloModule in the demos.
- open the Readme.txt
- open the Apache_dso.txt
a new apache
be root in the Console F1 now, and follow the instructions in Apache_dso.txt with CtrlAlt F7
- get the new apache : apache_1.3.19.tar.gz from their website
- copy it to /usr/apache and unpack.
it makes a directory /usr/apache/apache_1.3.19/
- create the file config.status in /usr/apache/apache_1.3.19/
and make it executable with chmod x+ config.status
- make
- make install
that was it so far. You have a new apache in /usr/local/apache now.
This might mean you have a second. I at least happen to have a second. The first being
found under /usr/local/httpd/ - at least the pages. Stop the first with rcapache stop.
It might be a good idea to remove its autostart with YAST.
Anyway, the new one is started as
cd /usr/local/apache/bin/ - go there as root
./apachectl start - start
./apachectl stop - stop
I'd assume that only one apache can run at the time. Either the original or the new.
setting Apache up
Follow the instructions in the Readme.txt as mentioned above.
- grant access for kylix to the httpd.conf :
cd /usr/local/apache/conf - as root in the F1 session
chmod go+rw httpd.conf - grant rw access to group and other
- grant kylik access to the /usr/local/apache/libexec
cd /usr/local/apache - as root in the F1 session
chmod go+rw libexec - grant rw access to group and other
- set the project outputdirectory to /usr/local/apache/libexec
in the kylix project/options/directories
and set the searchpath to /usr/local/apache/bin;/usr/local/apache/libexec
- build the project from the IDE - it worked.
No need for the commandline.
- in the kylix IDE edit the /usr/local/apache/conf/httpd.conf :
the user is wwwrun - at least suse wants it this way
the group is nogroup
add the lines
Loadmodule Hello_module /usr/localapche/libexec/libHelloModule.so
SetHandler Hello-Handler
where appropriate - about line 205 after DSO support
As the output directory was set to the apache, there is no need for the
mentioned :
SetEnv LD_LIBRARY_PATH (PathtoKylixRoot/bin)
Note that : Loadmodule Hello_module is different to what suggested.
HelloModule.dpr exported as follows :
exports
apache_module name 'Hello_module';
opposed to 'Hello_Module';
- run the demo as said.
I did it on another machine :
http//192.168.1.1/Helloworld/ - with 192.168.1.1 the IP of the linux machine
my kylix
home
last updated: 16.may.01
Copyright (99,2001) Ing.Büro R.Tschaggelar