|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
| News | Recommended Links | Cygwin Packages | X Window System | Xming | |||
| Replacing Exceed with Cygwin | Hummingbird Connectivity 2006 Suite | Putty | screen | Command line Net Tools | Perl | VIM | |
| uwin |
SFU (version 3.5) |
ssh | VNC | OFMs | Humor | Etc |
Cygwin is supported in the official source distributions from Apache 1.3.20 and later. Either compiled of pre-compiled version can be used.
Pre-compiled binaries for the Apache 1.3 are available from Cygwin installer.
/usr/include/apache
/usr/lib/apache
/usr/sbin/apachectl
/usr/share/doc/apache-1.3.33
/usr/share/doc/Cygwin/apache-1.3.33.README
Default http home is at /var/www/htdocs
Configuration files
Configuration files are in
/etc/apache
This Apache 1.3 port for Cygwin is designed to run on Windows XP and Windows 2000. In all cases TCP/IP networking must be installed.
We suggest using Cygwin 1.3.9-2 and higher.
Apache on Cygwin can be started and stopped in the same manner as on
Unix systems. You may also use the
apachectl tool for starting and stopping Apache.
If installed from precompiled binaries, you can start httpd
as follows:
$ /usr/sbin/apachectl start
An explicit background indicator (&) is not required.
The parent process is automatically detached from the current terminal.
Check the global error_log to see if Apache started cleanly
without any major problems.
To stop Apache send at least a SIGTERM signal to the
parent httpd process:
$ /usr/sbin/apachectl stop
In order to update configuration directives and reload the
httpd.conf configuration file, send a SIGHUP to
the parent httpd process:
$ /usr/sbin/apachectl restart
Apache on Cygwin can be invoked as a Windows XP or Windows 2000 service.
Cygwin has its own cygrunsrv.exe facility to define, remove,
start, and stop services as follows:
Use the following statement to install httpd.exe as
a new service:
$ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a arguments] \
[-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]
Where -a is used to pass command line arguments (such
as -DFOO defines) to httpd.exe, and
-e is used to pass environment variables. If necessary you may
use the -t options to set the autostart configuration for
the service. If you want the new service to run under a different userid,
you will have to supply the -u and -w options.
After the new service is installed it can be started using the following command:
$ cygrunsrv -S service_name
Check your process table and global error_log file to
ensure Apache has started without any major problems.
A running Apache service may be stopped using the following command:
$ cygrunsrv -E service_name
This will stop all running httpd.exe processes and shutdown
the HTTP service for the machine.
An installed Apache service may be removed from Windows XP or Windows 2000 using the following command:
$ cygrunsrv -R service_name
This will remove your previously defined and installed service from the machine.
Please refer to the man page for cygrunsrv
and the Cygwin mailing list for further details of how services are invoked.
Precompiled Apache for Cygwin is built with most of the available Apache modules:
# LoadModule foo_module libexec/mod_foo.so 205 LoadModule vhost_alias_module lib/apache/mod_vhost_alias.dll 206 LoadModule env_module lib/apache/mod_env.dll 207 LoadModule config_log_module lib/apache/mod_log_config.dll 208 LoadModule agent_log_module lib/apache/mod_log_agent.dll 209 LoadModule referer_log_module lib/apache/mod_log_referer.dll 210 LoadModule mime_magic_module lib/apache/mod_mime_magic.dll 211 LoadModule mime_module lib/apache/mod_mime.dll 212 LoadModule negotiation_module lib/apache/mod_negotiation.dll 213 LoadModule status_module lib/apache/mod_status.dll 214 LoadModule info_module lib/apache/mod_info.dll 215 LoadModule includes_module lib/apache/mod_include.dll 216 LoadModule autoindex_module lib/apache/mod_autoindex.dll 217 LoadModule dir_module lib/apache/mod_dir.dll 218 LoadModule cgi_module lib/apache/mod_cgi.dll 219 LoadModule asis_module lib/apache/mod_asis.dll 220 LoadModule imap_module lib/apache/mod_imap.dll 221 LoadModule action_module lib/apache/mod_actions.dll 222 LoadModule speling_module lib/apache/mod_speling.dll 223 LoadModule userdir_module lib/apache/mod_userdir.dll 224 LoadModule alias_module lib/apache/mod_alias.dll 225 LoadModule rewrite_module lib/apache/mod_rewrite.dll 226 LoadModule access_module lib/apache/mod_access.dll 227 LoadModule auth_module lib/apache/mod_auth.dll 228 LoadModule anon_auth_module lib/apache/mod_auth_anon.dll 229 LoadModule digest_module lib/apache/mod_digest.dll 230 LoadModule proxy_module lib/apache/libproxy.dll 231 LoadModule cern_meta_module lib/apache/mod_cern_meta.dll 232 LoadModule expires_module lib/apache/mod_expires.dll 233 LoadModule headers_module lib/apache/mod_headers.dll 234 LoadModule usertrack_module lib/apache/mod_usertrack.dll 235 LoadModule example_module lib/apache/mod_example.dll 236 LoadModule log_forensic_module lib/apache/mod_log_forensic.dll 237 LoadModule unique_id_module lib/apache/mod_unique_id.dll 238 LoadModule setenvif_module lib/apache/mod_setenvif.dll
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.
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.
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: August 11, 2009