windows . how to automatic satrt apache2 in ubuntu windows

I want to automatic start apache2 in ubuntu windows. So when startUp my laptop no longer running comment

service apache2 start

My OS is windows but i run apache in ubuntu windows.

1 answer

  • answered 2018-02-13 00:59 DBQ

    You can make any program run at startup (even bash on windows) by going to Run, entering shell:common startup and adding a shortcut of the program in that folder.
    Or simply place a shortcut of bash in the following location C:\Users\<YOURUSERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

    But you cannot startup apache2 as a service, only as daemons:

    Background tasks, daemons are now supported starting Insider build 17046. See theĀ blogĀ for more details. But, auto start of services is still not available.

    https://github.com/Microsoft/WSL/issues/511