httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patton, Billy N" <billy.pat...@h3net.com>
Subject Re: [users@httpd] C module
Date Mon, 20 Oct 2014 12:49:58 GMT
Thanks, my hello world is now working :)
On Oct 20, 2014, at 7:15 AM, Issac Goldstand <margol@beamartyr.net> wrote:

> 
> On 20/10/2014 14:58, Patton, Billy N wrote:
>> But when the actions you want to take are in the module, how do I call it?
>> Since my file.c is called mod_example.c and it compiles/installs as mod_example.so
>> Do I need a bogus file IE mod_example
>> Then set a handle for mod_example
>> 
>> where mod_example would be a simple
>> touch mod_example
>> 
>> Then in my .config
>> AddHandler mod_example mod_example
>> 
>> Then call from Chrome as
>> 
>> http://my_site/mod_example
>> 
>> I tried this, but all I got was a blank screen, no errors of any kind.
> 
> Hi Billy,
> 
> Welcome to the wonderful world of C modules for Apache :)
> 
> In the case of cgi, pl and pm you are calling the appropriate handlers
> for every such file on the filesystem
> 
> In your case, you'd either need to decide on a file pattern which will
> always be served by your handler and add an AddHandler line OR (and this
> is probably what you want) assign a specific URL to your module
> explicitly, like this:
> 
> <Location /mod_example>
>  SetHandler example-handler
> </Location>
> 
> Hope this helps,
>  Issac
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message