|
Both versions, Apache for Windows and Apache for Cygwin, are designed to run on the same
operating systems, the Windows NT and Windows 2000 family. But there are considerable
differences between the two flavors.
While Apache for Windows is a native Windows port, Apache for Cygwin relies on the Cygwin
POSIX.1 emulation layer provided by the cygwin1.dll dynamic library to create a
Unix compatible environment. Therefore we consider Apache for Cygwin closer to the Unix side
then to the Windows side, even while it runs on Windows.
Most significant differences are the amount of changes to the source code needed to compile
and run Apache on the Cygwin platform. While the native Windows port needs major changes and
platform specific additions, the Cygwin based port changes are very small and most of the Unix
source code can be used without major changes on the Cygwin platform.
When to use Apache for Cygwin and/or Apache versus Windows?
Apache for Cygwin is intended to be most useful if you want a seamless transition from Unix
systems to Windows systems for your HTTP services.
If you are using Windows NT or Windows 2000 for development and office purposes, but your
productive HTTP server environments are Unix based systems, you may use Apache for Cygwin to
develop on Windows and simply copy whole Apache configurations (i.e., httpd.conf)
and Perl (mod_perl), PHP (mod_php) or Python (mod_snake)
applications to your productive Unix systems.
What about modules (mod_foo) for Apache for Cygwin?
Apache for Cygwin can be built with most of the available Apache modules with no or minimal
changes. Many popular modules have been compiled and tested with Apache for Cygwin, including mod_dav,
mod_ssl, mod_php, mod_perl, mod_gzip, and mod_jserv.
While there are developers who directly support the Windows native port of Apache, very few
module developers do. That is why it is can be difficult to make a Unix-based Apache
installation with third-party modules work the same way on the Windows side using the native
port. Apache for Cygwin makes this much easier.
What are the differences in the configuration files?
While the Apache for Windows port uses Windows native path names to refer files and
directories, like
# httpd.conf (for Windows)
DocumentRoot "c:/apache/htdocs"
Apache for Cygwin can use unmodified POSIX style path names like
# httpd.conf (for Cygwin)
DocumentRoot "/usr/local/apache/htdocs"
What about performance?
Apache for Cygwin is not as high-performance as Apache for Windows on the same hardware.
This is to be expected, because Cygwin emulates a Unix environment on a "foreign"
operating system, while Apache for Windows uses Windows code in its own native environment.
First benchmark results have shown that Apache for Cygwin is about 30% slower than native
Apache for Windows counterpart.
|