notes on installing apache 2.2.6 for cygwin

That took forever and the solutions were scattered about. Oh yeah, I’m doing this in Windows XP Pro.

Started with Cygwin’s setup.exe.

Tried to start Apache and got this:

httpd: Could not reliably determine the server’s fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

This was solved by changing the Listening setting (line 40 of etc/httpd.conf) to 85 since another service was using 80.

I read several accounts of people clean restoring their machines to get an open listening socket. Don’t do that!

Let’s see, what was the next problem? Oh yes, this at the very bottom of the same http.conf file:

PHPIniDir “C:/prog/PHP/”
LoadModule php5_module “C:/prog/PHP/php5apache2_2.dll”

I don’t currently have PHP installed, and if I did install it, it wouldn’t be to that location. Perhaps this will cause some problem later, but for now it fixed things enough for me to get to the next problem…

Now, feeling pretty good, I was following these instructions, starting with Test since Cygwin had taken care of everything up to Customize and I had taken care of that already.

Of course, running
$ usr/sbin/apachectl -k start
did not work.

I got the following error:
/usr/sbin/apachectl2: line 78: 2340 Bad system call $HTTPD -k $ARGV

After a fair amount of poking around and trying things that did not work, I found this page, which got me back on the right track.

You have to have cygserver installed.
I swear I had done that before, but I did it again. Details on cygserver are here.

Run usr/bin/cygserver-config
When it asks you if you want to install as a service, say yes.

Set a global Windows environment variable: CYGWIN=server
To do this, right click on any “My Computer” you see and select Properties >> Advanced >> Environment variables.

Make sure you are in the system variables and not the user variables.

Start the cygserver service:

net start cygserver

HA! This must be it…

Try this again:
usr/sbin/apachectl -k start

STILL it didn’t work! Argv indeed.

I forget where I even found the answer, but the answer was to type in this instead:

CYGWIN=server usr/sbin/apachectl -k start


3 thoughts on “notes on installing apache 2.2.6 for cygwin”

Leave a Reply

Your email address will not be published. Required fields are marked *