You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Evgeny Beskrovny <ev...@emblaze.com> on 2002/02/14 13:53:25 UTC

Question about writing module for Apache

Hi,
I am supposed to write a module for Apache server. I am totally new to this
topic and we haven't received anu books yet, so this is a newbee question. I
need to make a translation from uri to some other name. 
This is what I wrote. It just returns some other file that exists in the
specified directory. However this program doesn't work. Apache says that the
page cannot be found.
Could someone tell me where is the problem?
Thanks,

#include "httpd.h"
#include "http_config.h"


module MODULE_VAR_EXPORT emblaze_module;


static const command_rec alias_cmds[] =
{
    {NULL}
};


static int translate_alias_redir(request_rec *r)
{
            r->filename = ap_pstrdup(r->pool,"c:\\Program Files\\Apache
Group\\Apache\\index.html");
	return OK;
}


module MODULE_VAR_EXPORT emblaze_module =
{
    STANDARD_MODULE_STUFF,
    NULL,			/* initializer */
    NULL,	/* dir config creater */
    NULL,	/* dir merger --- default is to override */
    NULL,	/* server config */
    NULL,		/* merge server configs */
    alias_cmds,			/* command table */
    NULL,			/* handlers */
    translate_alias_redir,	/* filename translation */
    NULL,			/* check_user_id */
    NULL,			/* check auth */
    NULL,			/* check access */
    NULL,			/* type_checker */
    NULL,		/* fixups */
    NULL,			/* logger */
    NULL,			/* header parser */
    NULL,			/* child_init */
    NULL,			/* child_exit */
    NULL			/* post read-request */
};


Beskrovny Evgeny
________________________
Senior Software Developer, NG Department
Research and Development Division
Emblaze Systems
Tel.      +972-3-572-1879
Mobile +972-52-246-187


**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  the 
sender immediately and do not disclose the contents to any one or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Question about writing module for Apache

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Evgeny Beskrovny wrote:
> 
> I am supposed to write a module for Apache server.

You may get some answers here, but you'd be better off asking
on the <ap...@Covalent.Net> list, where the module
writers hang out.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Question about writing module for Apache

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 14 Feb 2002, Evgeny Beskrovny wrote:

> Hi,
> I am supposed to write a module for Apache server. I am totally new to this
> topic and we haven't received anu books yet, so this is a newbee question.

I can't answer your question, but I can suggest a better list:
http://modules.apache.org/subscribe#API

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org