view · edit · sidebar · attach · print · history

Installing Apache on Windows

  • If you want to try to compile apxs from source try these instructions

See

 http://www.thesitewizard.com/apache/install-apache-on-vista.shtml

and download the installer

 http://apache.mirror.testserver.li//httpd/binaries/win32/httpd-2.2.17-win32-x86-openssl-0.9.8o.msi

Install Apache custom with the build headers. http://url.ba/3yfk download mod_ruby

 http://www.modruby.net/en/index.rbx/mod_ruby/download.html

and that you have to compile so enter the Magic-Bash of Luis Lavena

 rake ruby18:dependencies devkit:sh

also see this discussion here:

 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/44029

Apache Sources

 http://mirror.switch.ch/mirror/apache/dist//httpd/httpd-2.2.17.tar.bz2
 http://httpd.apache.org/download.cgi#apache22

I am trying

 ./configure.rb --with-apxs=/c/Users/zdavatz/software/httpd-2.2.17/support

in

 /c/Users/zdavatz/software/mod_ruby-1.3.0

this is a compiled version of mod_ruby but it does not load

 http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/

a smart thing could also be to use

 http://httpd.apache.org/docs/2.0/programs/apxs.html

apxs for windows

 http://www.apachelounge.com/download/apxs_win32.zip

from here

 https://weblion.psu.edu/trac/weblion/wiki/CompileModCosignOnWindows

ActiveState Perl can be found here

 http://downloads.activestate.com/ActivePerl/releases/5.8.9.828/ActivePerl-5.8.9.828-MSWin32-x86-294165.msi

I am trying to install apxs with

 C:\Users\zdavatz\software\apxs_win32\apxs>C:\Perl\bin\perl.exe Configure.pl

 It looks like you don't have a C compiler on your PATH, so you will not be
 able to compile C or XS extension modules.  You can install GCC from the
 MinGW package using the Perl Package Manager by running:

    ppm install MinGW

So I will enter bash again with

 rake ruby18:dependencies devkit:sh

This does not work as I did not have the Apache header files installed. See above

 sh-3.1$ /c/Perl/bin/perl.exe Configure.pl
 Set up gcc environment - 3.4.5 (mingw-vista special r3)
 No libhttpd library found under C:\Apache2.2\/lib at util.pl line 27.

Trying again with

 C:\Users\zdavatz\software\apxs_win32\apxs>C:/Perl/bin/perl Configure.pl

results in

 It looks like you don't have a C compiler on your PATH, so you will not be
 able to compile C or XS extension modules.  You can install GCC from the
 MinGW package using the Perl Package Manager by running:

    ppm install MinGW


 Use "C:\Apache2.2" for your Apache2 directory? [yes]

 apxs.bat has been created under C:\Apache2.2\bin.

 apr-1-config.pl.bat has been created under C:\Apache2.2\bin.

 apu-1-config.pl.bat has been created under C:\Apache2.2\bin.

Install MinGW into C:\MingW\ and try

C:\Users\zdavatz\software\mod_ruby-1.3.0>make
gcc   -g -O2 -DFD_SETSIZE=256    -Wall  -I. -IC:/Ruby187/lib/ruby/1.8/i386-mingw32 -IC:/Ruby187/lib/ruby/1.8/i386-mingw32/i386-mingw32 -IC:\Apache2.2\include  -DWIN32  -c request.c
In file included from C:\Apache2.2\include/ap_config.h:25:0,
                 from C:\Apache2.2\include/httpd.h:43,
                 from mod_ruby.h:101,
                 from request.c:36:
C:\Apache2.2\include/apr.h:57:0: warning: ignoring #pragma warning
request.c:794:13: error: conflicting types for 'mode_t'
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/sys/types.h:99:17: note: previous declaration of 'mode_t' was here
request.c: In function 'request_finfo':
request.c:877:17: warning: assignment makes integer from pointer without a cast
request.c:878:17: warning: assignment makes integer from pointer without a cast
request.c: In function 'request_send_fd':
request.c:1580:5: warning: passing argument 2 of 'apr_os_file_put' from incompatible pointer type
C:\Apache2.2\include/apr_portable.h:340:27: note: expected 'void **' but argument is of type 'int *'
make: *** [request.o] Error 1

then retry

sh-3.1$ make
gcc   -g -O2 -DFD_SETSIZE=256    -Wall  -I. -IC:/Ruby187/lib/ruby/1.8/i386-mingw32 -IC:/Ruby187/lib/ruby/1.8/i386-mingw32/i386-mingw32 -IC:\Apache2.2\include  -DWIN32  -c request.c
In file included from C:/Apache2.2/include/ap_config.h:25,
                 from C:/Apache2.2/include/httpd.h:43,
                 from mod_ruby.h:101,
                 from request.c:36:
C:/Apache2.2/include/apr.h:57: warning: ignoring #pragma warning
request.c:794: error: conflicting types for 'mode_t'
C:/Users/zdavatz/software/rubyinstaller/sandbox/devkit/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/types.h:85: error: previous declaration of 'mode_t' was here
request.c: In function `request_finfo':
request.c:877: warning: assignment makes integer from pointer without a cast
request.c:878: warning: assignment makes integer from pointer without a cast
request.c: In function `request_send_fd':
request.c:1580: warning: passing arg 2 of `apr_os_file_put' from incompatible pointer type
make: *** [request.o] Error 1
view · edit · sidebar · attach · print · history
Page last modified on January 14, 2011, at 05:58 PM