Unit httpd.service could not be found.
by ivonak from LinuxQuestions.org on (#4SDR1)
So I did ssh into ec2 instance on aws in my ubuntu (wsl ubuntu) and I installed apache2 server, with that I had no problems, I used: sudo apt -y install apache2
and then I tried to do sudo service httpd start, and all the time I'm getting the error: Failed to start httpd.service: Unit httpd.service not found.
And when I try to do sudo systemctl status apache2 it says that server is active and running..
I don't understand why I'm getting that error, also because I'm trying to write a script and now I'm checking if all of my commands in it are ok before I try to run it.
Thanks in advance.


and then I tried to do sudo service httpd start, and all the time I'm getting the error: Failed to start httpd.service: Unit httpd.service not found.
And when I try to do sudo systemctl status apache2 it says that server is active and running..
I don't understand why I'm getting that error, also because I'm trying to write a script and now I'm checking if all of my commands in it are ok before I try to run it.
Thanks in advance.