3

Formerly titled 'Cannot find httpd after sudo apt-get install apache2 (emulation of Ubuntu running on Windows)'

So I installed Canonical Group Limited Ubuntu App for Windows 10 after installing Windows Subsytem For Linux for an emulation of Ubuntu running on Windows 10.

Running lsb_release -a

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

So I ran sudo apt-get install apache2 and I can see some evidence of install in that there now exists /etc/apache2 directory and there is a default Apache index.html page at /var/www/html/index/html.

But there is no httpd in usr/bin or usr/sbin.

So where is httpd ?

I cannot start Apache with sudo systemctl restart apache2 it reports

Failed to connect to bus: No such file or directory
3
  • 2
    For what it's worth, the Apache packages don't install an httpd binary. Run this command to find all the binaries installed by the apache packages: dpkg-query -L apache2 apache2-bin apache2-data apache2-utils | grep -E '/usr/s?bin/'
    – Dan
    Dec 13, 2017 at 14:49
  • sudo systemctl restart apache2.service Works on Ubuntu 16.04 higher as long as systemd is running. reference cyberciti.biz/faq/…
    – Lazytux
    Dec 20, 2017 at 22:35
  • @Lazytux OP is running Ubuntu with WSL (Windows Subsystem for Linux) which doesn't seem to support systemd yet.
    – Dan
    Jan 4, 2018 at 13:19

1 Answer 1

8

Th systemctl issue is covered (but not eaxctly solved) here systemctl doesn't work in Xenial · Issue #1579 · Microsoft_WSL · GitHub

Instead of systemctl to start Apache use the following

sudo /etc/init.d/apache2 start
1
  • @Panther: I'll try, in the future. I studied Linux a dozen years ago, so I'm rusty. I'll try to remember to expand this answer once I figure out correct answer.
    – S Meaden
    Dec 13, 2017 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .