I wish to produce a apache extension for my special protocol wich listens on a single port as apache but on the specific directory or file like php. I want this to energy my game having a custom server although not with php. I cant listen on the different port or different server.

I shouldn't produce a php file or something like that similar. i want an entire executable program where i'm able to dynamically allocate memory etc. this program is completly outdoors from the apache server, however the apache 'passes-through' special demands for this program (for instance the .foo files or even the /foo/ directory.

I want a tutorial or perhaps a help to produce a custom extension for apache.


i wish to produce a daemon running without anyone's knowledge of my server, after which when apache transmits a request, it submitted this to my daemon, and so the daemon creates the request, after which send a solution. this will be significant that's nothing like a php script file or perhaps a perl since this is not performed once, this program is running in history, and awaiting the apache to transmit something. i dont understand how to talk to apache. However i think this isn't a CGI, if i just read well, the CGI running is much like: apache will get the reuest, after which Begin a new process for my php or perl file, transmits the datas through arguments and stdIN, after which once the process finishes, reads the solution make up the stdOut and send it back, the procedure then finished.

But my prgram still running. I have to run my program without anyone's knowledge in history because i have to store data within the memory that is loaded at startup.

such as this.: http://i53.tinypic.com/v45jzo.jpg

You do not need a unique extension, just register a CGI handler that calls your processing code.

Edit You are able to setup apache to proxy demands for your daemon.

You will have to return a correctly formatted HTTP response or it will not work. You need to educate yourself on Apache and internet based communications generally to obtain a better idea precisely what it takes inside your daemon.

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /foo http://foo.example.com/bar
ProxyPassReverse /foo http://foo.example.com/bar 

P.S. Writing an Apache extension is much harder an not portable.

To reply to your next question by what CGI is

CGI means common gateway interface.

whenever you register a handler as Byron stated you know apache to own 'request' for your application. apache learns the output stdout of the application and returns the end result towards the user.

The parameters for that application are provided through the atmosphere which you'll access out of your application.

But when you do not appreciate this stuff you will encounter problems. for example you have to set certain headers.