Install Apache in Cygwin

It is very hard to make Apache work under Cygwin. This article helped a lot:
https://www.rafaelhart.com/2016/02/installing-apache-2016/
Anyway, I followed these steps:
1. Run cygwin setup program and choose httpd and httpd-mod_http2.
2. Start Cygwin with administrator rights.
3. In Cygwin, execute these commands:
a. cygserver-config
b. cygrunsrv -S cygserver
c. cygrunsrv -I httpd -d “CYGWIN Apache web server” -p /usr/sbin/httpd
d. cygrunsrv -S httpd
The last command failed and I have to modify /etc/httpd/conf/httpd.conf and uncomment this line:
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

It was still not working. So I have to modify permissions by using “properties | Security”
dialogue to explicitly add Full Control for the SYSTEM
user to:
C:\Cygwin
C:\Cygwin\var
C:\Cygwin\var\log

After this Apache should be working but if you execute “cygrunsrv -S httpd” you still still get error message. Check “/var/log/httpd.log” and it shows httpd is already running.
Aha!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment