logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: How to Run mod_example on Windows XP machine
Author
samapache



Joined: 18 Nov 2010
Posts: 7

PostPosted: Mon 29 Nov '10 0:25    Post subject: How to Run mod_example on Windows XP machine Reply with quote

Hi,
I am working on the windows XP machine and installed Apache 2.2. I have also httpd-2.2.17 srs. I was able to compile mod_example and create mod_example.so file(through my post @ http://www.apachelounge.com/viewtopic.php?p=16879#16879 )

But I am unable to run this module. I have copied the so file in the C:\Apache2.2\modules directory and added:

LoadModule example_module modules/mod_example.so in the httpd.conf at C:\Apache2.2\conf and restarted the server. When I type:
http://localhost/example_handler in the browser i get HTTP 404 not found.

Please let me know how to run the example.

Thanks
sam
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 29 Nov '10 10:44    Post subject: Reply with quote

did you check your error log? What does it say about the 404?
Back to top
samapache



Joined: 18 Nov 2010
Posts: 7

PostPosted: Thu 02 Dec '10 0:49    Post subject: Compiled and running Reply with quote

Hi,
Thanks for all your help. Its running now:

I did follloing in the httpd.conf file:

LoadModule example_module modules/mod_example.so
.
.
.
.
<Location /example-info>
SetHandler example-handler
</Location>

Please make me understand:
There is a code in the example:
.
static int x_handler(request_rec *r)
{
x_cfg *dcfg;

if (strcmp(r->handler, "example-handler")) {
return DECLINED;
}
.
But this seems to be only comparing not assigning the module name. From where apache picked "example-handler" name?

thanks
sam
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 02 Dec '10 20:16    Post subject: Reply with quote

Hi sam,

At this point in time I cannot help you to understand that. It does seem odd but I would need to study the context behind it.
I am glad you got it working however!
Back to top
samapache



Joined: 18 Nov 2010
Posts: 7

PostPosted: Wed 08 Dec '10 2:53    Post subject: Debugging the mod_example Reply with quote

Hi,
As now my module is running, to understand it I need to debug it.

1. Anyone has done module debugging in Apache on windows(VC++)?
2. I compiled the module through command prompt as I was not able to compile through VC2008. Please let me know how to compile if we need VC++ for debugging.

My other requirement it: Writing Apache modules in C++. Has anyone written modules in C++?

Please note: I have not compiled Apache server and i am running downloaded server binary only. Please let me know in order to debug my written modules

thanks
sam
Back to top


Reply to topic   Topic: How to Run mod_example on Windows XP machine View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads