Score:0

Where is the apache2 directory on Ubuntu 20.04?

in flag
a a

In order to activate the Basic Auth I installed apache2-utils:

sudo apt-get update -y
sudo apt-get install -y apache2-utils

but I can't find the /etc/apache2 directory. I uninstalled and reinstalled the package and I still can't find the location of the directory. However the command

htpasswd

is working. Do you have any ideas where the directory is located? Thank you!

paladin avatar
kr flag
Have you installed apache2?
a a avatar
in flag
a a
Thank you fot the answer! No, but I thought this is installed along with utils? The documentation https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ says I have to install apache2-utils (Debian, Ubuntu) or httpd-tools and then I should find the directory /etc/apache2 ?
ru flag
`apache2-utils` can exist standalone to Apache2 the webserver. Utils are not dependent on the Apache2 webserver itself to operate.
paladin avatar
kr flag
Nginx is an http-server by itself. I guess apache2 is only mentioned as an example. Because many people use apache2 as main http-server and nginx for load-balancing. It's worth to read more about this topic. Configuring a server is not an easy go, when your goal is to have a stable, performant and secure server.
Score:1
in flag

Based on the package list, you will not have an /etc/apache2 directory after installing the utilities. Oddly enough, you will need to install the web server itself, and probably reinstall the utilities to ensure things are properly aware of each other.

sudo apt install apache2
sudo apt install --reinstall apache2-utils
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.