Installing Apache on Windows Subsystem for Linux Installing Apache on Windows Subsystem for Linux linux linux

Installing Apache on Windows Subsystem for Linux


In order to eliminate this warning

Invalid argument: AH00076: Failed to enable APR_TCP_DEFER_ACCEP

Add this to the end of /etc/apache2/apache2.conf

AcceptFilter http none


Note the following in your output

failed to create directory via template '/var/lock/apache2.XXXXXXXXXX': No such file 

I tried listing /var/lock. It points to /run/lock, which doesn't exist.

Create the directory with

mkdir -p /run/lock

The install should now work (you may need to clean the installation first)

apache running on Windows Ubuntu


You have to start bash.exe in administrator mode to avoid a lot of problems related to network.i installed Lamp (Apache/MySQL/Php) without any problem :

  • Start bash.exe in administrator mode

  • type : sudo apt-get install lamp-server^

  • add these 2 lines in /etc/apache2/apache2.conf :

Servername localhost

AcceptFilter http none

then you can start apache :/etc/init.d/apache2 start