Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Newbie Needs Help With Apache for Windows. (Compiling and Mods)

Posted on 2004-11-11
3
Medium Priority
?
159 Views
Last Modified: 2010-03-04
I've been a programmer for quite a while (windows), and recently, I've been playng around with Apache and the Mono project for Windows. I have been able to successfully create some tests with .NET to run with GTK (windows apps) and the mono server (web apps) for Windows. I have also gotten Apache to be working successfully on my Windows server. But when it comes to compiling some of these mods available for Apache, I have no idea what to do.

So starting from the ground up, where do I go and what do I need to do? I need instructions for doing this in Windows.
What compiler(s) do I need?
What is needed for something to be compiled from source code? (Makefile.win32?)
Also, is there a working mod for mono on Apache yet? From the stuff I found recently, it was a no, but a new release has been made, but the other documentation has not yet been updated.

I'd appreciate the help. Thanks in advance.
0
Comment
Question by:jeremypettit
  • 2
3 Comments
 
LVL 1

Author Comment

by:jeremypettit
ID: 12559968
Of the things I've been able to compile has been source code with a "MakeFile.win32" file by running my Visual Studio command line utility and using the nmake command.

Example: nmake -f makefile.win32

This then creates a bin directory with my compiled assemblies.
0
 
LVL 4

Accepted Solution

by:
TomDavidson earned 2000 total points
ID: 12582715
There is a mono module called mod_mono (http://www.go-mono.com/asp-net.html#mod_mono) however it does not work on windows.

This might help you compile apache on windows:
http://bugzilla.esteelauder.co.uk/manual/win_compiling.html

From (http://httpd.apache.org/docs/mod/mod_so.html):

When a module does work, it can be added to the server in one of two ways. As with Unix, it can be compiled into the server. Because Apache for Windows does not have the Configure program of Apache for Unix, the module's source file must be added to the ApacheCore project file, and its symbols must be added to the os\win32\modules.c file.

The second way is to compile the module as a DLL, a shared library that can be loaded into the server at runtime, using the LoadModule directive. These module DLLs can be distributed and run on any Apache for Windows installation, without recompilation of the server.

To create a module DLL, a small change is necessary to the module's source file: The module record must be exported from the DLL (which will be created later; see below). To do this, add the MODULE_VAR_EXPORT (defined in the Apache header files) to your module's module record definition. For example, if your module has:

    module foo_module;

Replace the above with:

    module MODULE_VAR_EXPORT foo_module;

Note that this will only be activated on Windows, so the module can continue to be used, unchanged, with Unix if needed. Also, if you are familiar with .DEF files, you can export the module record with that method instead.

Now, create a DLL containing your module. You will need to link this against the ApacheCore.lib export library that is created when the ApacheCore.dll shared library is compiled. You may also have to change the compiler settings to ensure that the Apache header files are correctly located.

This should create a DLL version of your module. Now simply place it in the modules directory of your server root, and use the LoadModule directive to load it.



Not really a windows programmer myself but it looks like it might help, good luck
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12617267
Thanks, for your reply, and sorry I haven't responded right away. I've been pretty busy, but I should be able to dig into this later this coming weekend. Thanks again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question