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: Apache 2.2.8a binary with IPV6
Author
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Sun 13 Apr '08 19:28    Post subject: Apache 2.2.8a binary with IPV6 Reply with quote

Build with IPV6 enabled.

It is build with Visual Studio® 2008 aka VC9.
The binary includes the Apache Lounge fixes and additions already in 2.2.8 and 2.2.8a ("Restart/Shutdown" and "Windows console" fixes) plus IPV6 enabled and IPV6 fixes.

Apache 2.2.8a-ipv6 with apr-1.2.12 apr-util-1.2.12 apr-iconv-1.2.1 openssl-0.9.8h+asm zlib-1.2.3+asm
+ IPV6 enabled + IPV6 fix + "Restart/Shutdown" and "Windows console" fixes + DSO enabled

22 May 2008 update with fix that IPV6 and/or IPV4 is working on all Windows versions
30 May 2008 update OpenSSL to version 0.9.8h


Downloads removed, there are newer versions.

Thanks,

Steffen


Last edited by Steffen on Sat 31 May '08 17:34; edited 2 times in total
Back to top
dj02



Joined: 11 Dec 2005
Posts: 23
Location: FI, EU

PostPosted: Sun 13 Apr '08 19:48    Post subject: Reply with quote

This package have worked well in my server (IPv4 and IPv6 connections) Smile

OS: Windows Vista Ultimate SP1 x64


In httpd.conf:
Code:

Listen 80
Listen 443


and in extra/httpd-ssl.conf
Code:

Listen 0.0.0.0:443
Listen [::]:443


EDIT 08.05.2008: Still running without any problems and now on production use. Smile

---------------------------
Best Regards,

Mika (Dj02),
ApacheLounge Finnish MirrorSite's Administrator,
Helsinki,
Finland,
Europe


Last edited by dj02 on Thu 08 May '08 22:37; edited 2 times in total
Back to top
Sob



Joined: 19 Apr 2008
Posts: 30

PostPosted: Sat 19 Apr '08 17:46    Post subject: Reply with quote

Doesn't work with pre-Vista Windows and IPv6 enabled (tested with WinXP SP2 and Win2003 SP2). Gives this error (not exact message, but my translation from language used by OS):

[crit] (OS 10042)Unknown, invalid or unsupported option when calling getsockopt or setsockopt. : make_sock: for address [::]:88, apr_socket_opt_set: (IPV6_V6ONLY)

From what I found, it seems these Windows versions does not support IPV6_V6ONLY option. But as they have IPv4 and IPv6 as two different stacks, all IPv6 sockets always behave as V6ONLY.
I guess the solution would be to transform the compile time condition in server\listen.c, lines 74-86 to runtime one, executed only when running on at least Vista. And the same goes for lines 411-425.
Another possibility might be to modify apr_socket_opt_set() and apr_socket_opt_get() to pretend that IPV6_V6ONLY is understood.
Back to top
kefe



Joined: 10 May 2008
Posts: 1

PostPosted: Sat 10 May '08 18:34    Post subject: Reply with quote

Quote:
[crit] (OS 10042)Unknown, invalid or unsupported option when calling getsockopt or setsockopt. : make_sock: for address [::]:88, apr_socket_opt_set: (IPV6_V6ONLY)


Got the same error with Microsoft Windows XP Media Center Edition Version 2002 Service Pack 3; winver cmd output: Microsoft Windows Version 5.1, Build 2600.xpsp.080413-2111 : Service Pack 3, and I dont use mod_fcgid
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 11 May '08 17:36    Post subject: Reply with quote

hmmmm... It sounds like it will not be safe to build Apache 2.2 with IPV6 enabled.
Apparently it works OK for some, but fails for others...
Curiously, it works fine for me on Win2k (with no IPV6 capability).

This problem is probably why the ASF Windows binary distribution does not have IPV6 enabled.

I think the safest thing is for Apache Lounge to continue to distribute Apache 2.2.8 (and 2.2.9 when it is ready) without IPV6 enabled.
Unfortunately, this means that anyone who wants to use IPV6 will still need to compile their own binaries.

-tom-
Back to top
glsmith
Moderator


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

PostPosted: Sun 11 May '08 23:10    Post subject: Reply with quote

heh heh .. more work, I know :o)


Why not offer both with a warning to XP users the IPv6 build is a no-no.
This would leave (I believe) AL as the "only" source for an IPv6 enabled Apache on Windows (Vista/2008)

Just piping up, that was the same problem I had with the IPv6 enabled at compile, figured it was my problem configuring and not a XP/Apache problem, know better now.

Curious now as it is something I forgot to test, If you do not configure Apache to Listen on IPv6 yet was built with APR_HAVE_IPV6=1 will it still throw a tantrum? Especially if TCP/IP v6 is not installed on XP (as is the case by default).

Maybe something I'll try tonight.
Back to top
glsmith
Moderator


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

PostPosted: Mon 12 May '08 22:00    Post subject: Reply with quote

Seems fine on XP as long as your do not configure to listen IPv6

Server version: Apache/2.2.9-dev (Win32)
Server built: May 12 2008 12:31:23
Server's Module Magic Number: 20051115:12
Server loaded: APR 1.3.0-dev, APR-Util 1.3.0-dev
Compiled using: APR 1.3.0-dev, APR-Util 1.3.0-dev
Architecture: 32-bit
Server MPM: WinNT
threaded: yes (fixed thread count)
forked: no
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/winnt"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/apache"
-D SUEXEC_BIN="/apache/bin/suexec"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error.log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

or am I not getting the point?
Gregg
Back to top
Sob



Joined: 19 Apr 2008
Posts: 30

PostPosted: Tue 13 May '08 3:50    Post subject: Reply with quote

There is no major obstacle for IPv6 on WinXP. All what is needed is to detect Windows version and if it's less than Vista, then do not mess with IPV6_V6ONLY option.

This works for me:

http://web.hisoftware.cz/sob/download/apache-2.2.8-winxp-ipv6.patch
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 679

PostPosted: Thu 22 May '08 22:53    Post subject: Reply with quote

Download at the start post is updated with a IPV6 fix from Tom.

Tom explains the fix in the post 23 May 2008 below.

Steffen


Last edited by admin on Sun 25 May '08 14:40; edited 1 time in total
Back to top
dj02



Joined: 11 Dec 2005
Posts: 23
Location: FI, EU

PostPosted: Thu 22 May '08 23:06    Post subject: Reply with quote

This updated package works well aswell for me.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 23 May '08 3:45    Post subject: Reply with quote

This fix changes two APR files for IPv6:
    1 - change affects building Apache with different SDKs
      The socket option symbol IPV6_V6ONLY is defined in the Microsoft Windows Software Development Kit (SDK) for Server 2008 or Vista.
      It is undefined in the Microsoft Platform SDK for Windows Server 2003 R2 and earlier SDKs.

      This patch changes apr/include/arch/win32/apr_arch_networkio.h to define this symbol if it isn't defined by the SDK.
      FYI - the value for the IPV6_V6ONLY symbol is 27


    2 - change affects runtime decision about the IPV6_ONLY or combined IPv4/IPV6 operation of a network adapter
      This patch changes apr/network_io/win32/sockopt.c to return APR_ENOTIMPL (Not Implemented) if the runtime version of Windows
      does not support V6ONLY. Previously it was decided at compile-time.

      I suspect this is why XP users got the "invalid or unsupported option" error when Apache tried to set a socket option that XP doesn't support.
It is great to get some feedback about the change, because very few of us have IPV6 networks to test it on.

I am especially grateful to dj02 - who was already up and running without this fix, but took the time to test it anyway. Vista was one of my concerns, and it is good to know someone who runs both IPv4 and IPv6 connections on Vista has given it a test.

The patch that Sob points to looks like it might work, but it changes a file (listen.c) which all platforms use, not just Windows. This fix changes APR only, and it only changes Windows-specific files in APR. That may go over better with the Apache developers.

One more note: This is likely not to be the final version. A few hours (OK, to be honest - a lot of hours...) of testing and debugging usually can improve a first attempt at a fix. Now that this fix shows promise I will make an effort to do this before proposing it to the Apache developers.

-tom-
Back to top
Sob



Joined: 19 Apr 2008
Posts: 30

PostPosted: Sat 24 May '08 0:15    Post subject: Reply with quote

Sorry to say, but it's not perfect yet.

It works when Listen is set to some specific address (both IPv4 and IPv6 are ok).
But it does not work with default:

Listen 80

which should be the same as:

Listen [::]:80
Listen 0.0.0.0:80

and it does not work too. Apache just exists.

I think I can explain part of it. There is a code block in listen.c (second conditional block in my patch) where listening on 0.0.0.0 gets removed if previous address is [::] without V6ONLY option (= IPv4 will be handled by IPv6 socket). Currently apr_socket_opt_get() will say that socket is not V6ONLY, but it in fact always is (on XP).

I guess apr_socket_opt_get() should include additional case at the beginning, something like:

case APR_IPV6_V6ONLY:
if(current_os_version < Vista) {
on = 1;
return APR_SUCCESS;
}

But still it's strange, I'd expect it to just remove 0.0.0.0 and listen on [::] only.

Interestingly, this works as expected:

Listen [::]:80
Listen 0.0.0.0:80
Listen 127.0.0.1:80

The second (0.0.0.0) gets removed because of the above and Apache keeps running, listening at [::]:80 and 127.0.0.1:80.
So it seems that there is some other bug somewhere..
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sat 24 May '08 23:22    Post subject: Reply with quote

That result actually makes some sense.

XP, Svr2003, and Win2k (with the IPv6 preview) have two separate IP stacks - one for v4 and one for v6.

Svr2008, Vista, and probably the next Windows release have one single IP stack which handles both v4 & v6.

This would explain why it requires two Listen directives on some versions and a single Listen directive on newer versions.

Unfortunately, Microsoft put the symbols which define these differences into the SDK, so they depend on what SDK you compile with - not what version of Windows you are running on. Ugh!

That probably explains why ASF didn't want to ship Apache with IPV6 built in. The rules would be hard to explain to end users.

I suspect IPV6 won't become very popular on Windows until software vendors make Vista/Svr2008+ the minimum required platform. That way they won't need to ship two versions of their software to support it.

-tom-
Back to top
Sob



Joined: 19 Apr 2008
Posts: 30

PostPosted: Sun 25 May '08 13:48    Post subject: Reply with quote

There's even more fun with Microsoft's IPv6. Everything before Vista have separate stacks, but in addition, Win2k has IPv6-aware functions in separate dll. And unless an application is compiled with special wrapper (or does manual OS version checking and loading of that dll), there will be no IPv6 support. Apache does not do it, so current version won't work with IPv6 on Win2k.
But since Win2k is slowly getting outdated, it's IPv6 stack is only Technology Preview and everyone was able to live without IPv6 enabled Apache so far, there's probably no point in trying to make it work there.

But on WinXP and Win2k3, IPv6 is said to be production quality and fully supported, so it would be nice if Apache could use it.

Here is my second attempt for a fix:

http://web.hisoftware.cz/sob/download/apache-2.2.8-winxp-ipv6-try2.patch

It's very simple. On Vista it works as before. On XP/2k3 apr_socket_opt_set() pretends that IPV6_V6ONLY was set, so apr_socket_opt_get() will correctly say that socket is V6ONLY. It works with IPv4 mapped IPv6 addresses disabled (default). It would probably work even if they were enabled, but it seems there's no trace of them in win32 code, so we probably don't have to worry about it.
Back to top
whylion



Joined: 12 Jan 2009
Posts: 1

PostPosted: Mon 12 Jan '09 23:07    Post subject: Reply with quote

Steffen, I'm sorry but I can't find your contact email address.
I need the Apache 2.2.11 IPV6 binary running on Winxp. Could you send me a copy to the email:whylion@gmail.com? Thanks.
Back to top
dsumedh



Joined: 19 Jan 2009
Posts: 2

PostPosted: Mon 19 Jan '09 19:06    Post subject: Reply with quote

Steffan, can you also plz send me a copy:: dsumedh at gmail dot com
Back to top
wesleyjwilson



Joined: 12 May 2010
Posts: 1

PostPosted: Wed 12 May '10 23:38    Post subject: Can't find a complete Windows solution for Apache with IPv6 Reply with quote

I have a requirement for a single Apache install to support IPv4, IPv6, and do so on both WinSrv2003 (separate IPv4 and IPv6 stacks) and WinSrv2008 (single IPv4/IPv6 stack). Since the Win32 binaries are built by default without IPv6 enabled, I have recompiled Apache 2.0 with "APR_HAVE_IPV6". The version info is this:
Server version: Apache/2.0.63
Server built: May 7 2010 13:15:32
Server's Module Magic Number: 20020903:13
Server loaded: APR 0.9.17, APR-UTIL 0.9.15
Compiled using: APR 0.9.17, APR-UTIL 0.9.15
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/winnt"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/apache"
-D SUEXEC_BIN="/apache/bin/suexec"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error.log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Here are the results of my testing

------- Test with WinSrv2008 -------
1a. WinSrv2008, ssl.conf has "Listen 443".
Results:
- "telnet <ipv4> 443" listening = NO
- "telnet <ipv6> 443" listening = YES
- log\error.log = Fills up with messages "[warn] (OS 122)The data area passed to a system call is too small. : winnt_accept: Asynchronous AcceptEx failed."

1b. WinSrv2008, ssl.conf has "Listen 0.0.0.0:443".
Results:
- "telnet <ipv4> 443" listening = YES
- "telnet <ipv6> 443" listening = NO (as expected)
- log\error.log = No errors.

1c. WinSrv2008, ssl.conf has "Listen [::]:443".
Results:
- "telnet <ipv4> 443" listening = NO (as expected)
- "telnet <ipv6> 443" listening = YES
= log\error.log = No errors.

1d. WinSrv2008, ssl.conf has "Listen 0.0.0.0:443 and Listen [::]:443".
Results: Same as #1a above.

------- Test with WinSrv2003 ------
2a. WinSrv2003, ssl.conf has "Listen 443".
Results:
- Fails to start. Event Viewer shows " [crit] (OS 10042)An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call. : make_sock: for address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)"

2b. WinSrv2008, ssl.conf has "Listen 0.0.0.0:443".
Results:
- "telnet <ipv4> 443" listening = YES
- "telnet <ipv6> 443" listening = NO (as expected)
- log\error.log = No errors.

2c. WinSrv2008, ssl.conf has "Listen [::]:443".
Results:
- Fails the same as 2a.

2d. WinSrv2008, ssl.conf has "Listen 0.0.0.0:443 and Listen [::]:443".
Results:
- Fails the same as #2a.

--------- Test with WinSrv2003 + Sob's fixes -------
For WinSrv2003, I have even implemented the changes mentioned by Sob (http://www.apachelounge.com/viewtopic.php?t=2398). Here are those results:

3a. WinSrv2003 + Sob-fixes, ssl.conf has "Listen 443"
Results:
- "telnet <ipv4> 443" listening = NO
- "telnet <ipv6> 443" listening = YES
- log\error.log = Fills up with messages "[error] (OS 10022)An invalid argument was supplied. : Child 2176: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive."

3b. WinSrv2003 + Sob-fixes, ssl.conf has "Listen 0.0.0.0:443"
Results:
- "telnet <ipv4> 443" listening = YES
- "telnet <ipv6> 443" listening = NO (as expected).
- log\error.log = No errors.

3c. WinSrv2003 + Sob-fixes, ssl.conf has "Listen [::]:443".
Results:
- "telnet <ipv4> 443" listening = NO (as expected)
- "telnet <ipv6> 443" listening = YES
- log\error.log = Fills up with messages "[error] (OS 10022)An invalid argument was supplied. : Child 2492: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive."

3d. WinSrv2003 + Sob-fixes, ssl.conf has "Listen 0.0.0.0:443 and Listen [::]:443".
Results:
- "telnet <ipv4> 443" listening = YES
- "telnet <ipv6> 443" listening = YES
- log\error.log = Fills up with messages "[error] (OS 10022)An invalid argument was supplied. : Child 1336: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive."


So the million dollar question is:
How can I build an Apache for Windows that will listen on IPV4 and IPv6 that works on both WinSrv2003 (with or without IPv6 stack) and WinSrv2008?

Thanks,
Wes
Back to top
glsmith
Moderator


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

PostPosted: Thu 13 May '10 1:17    Post subject: Reply with quote

A 2.2.15 build with ipv6 turned on at build should work on 2008 w/o patch.
A 2.2.15 build with sob's patch should work on 2003 and 2008

The deal is the Apache version I'm suspecting. AFAIK, only 2.2 has gotten the attention needed to get at least Vista and 7 running IPv6 w/o patch, I do not believe it has trickled down to 2.0, especially a 2 year old 2.0.63, nor should you expect 2.0 ever to get there.
Back to top


Reply to topic   Topic: Apache 2.2.8a binary with IPV6 View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads