Cygwin and Apache?

Andrew DeFaria
Fri Mar 19 13:21:00 GMT 2004

George Hester wrote:

>I installed the Apache module in Cygwin.  All seemed to go fine there.  I have used mostly IIS in Windows 2000 but lately started experimenting with Tomcat.  Anyway I thought I would try Apache in Cygwin.  After the installation I wasn't sure what to do next other then search the Web on "Cygwin Apache."  Which is what I did and found this:
>Well I figured Cygwin would install Apache such that with little or no re-configuration on my part it would work.  So I just started Cygwin in the bash shell (the default way Cygwin is installed) and typed "httpd" w/o the quotes.  The result was that the command httpd was unrecognized.  So I went to the directory structure of Cygwin and found that httpd.exe is NOT in C:\cygwin\usr\local\bin but in C:\cygwin\usr\sbin.
>What have I done wrong?
You didn't type /usr/sbin/httpd! :-)

But seriously, after you get to that point and have configured your web 
server to run you probably want it to run all the time, even when you 
are not logged in. Then you need to add Apache as a service:

$ cygrunsrv -I apache -p /usr/sbin/httpd -d "Apache for Cygwin" -f 
"Apache Web Server running under Cygwin" -a -F

The -a -F part tells Apache to do the right thing WRT running as a 
service. Then start it with

$ net start apache

Oh and you probably should first add C:\Cygwin\Bin to your Windows 
system environment variable PATH (I stick it in the front) and reboot 
your system before doing the net start.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list