You can use several programs to view running processes in Linux, and they come in both graphical and command-line options.
Related: How to list processes …
Read More
Partitions and disks are bound to get full if not properly managed. It is therefore essential to continually monitor the current utilization and the remaining free space of your …
Read More
You download files and install applications to your system. At the same time, your system generates temporary files and writes logs. That eats up your precious disk space, which …
Read More
You need to mount the disks or partitions that you want to use to a folder or mount point before the data within it is accessible. From there, you'll …
Read More
Hard drive or partition cloning can be used for data backup and to replicate an existing system elsewhere. It could also be used as a non-destructive method to perform …
Read More
rar is a proprietary format for file archiving and is developed by RARLAB. It distributes WinRAR for Windows and an aptly named rar tool for Linux to create and …
Read More
Optical disks used for operating system or game installer, or for media content such as Blu-ray, DVD, or CD are very prone to scratches. One way to protect the …
Read More
Apache Access Log records incoming HTTP requests to the server, and CustomLog directive defines what is kept in the log. The following is an example HTTP request, CustomLog directive, …
Read More
Apache webserver reads its configuration files every time it's started. The configuration files are in plain text format, and Apache will need to restart every time there are changes …
Read More
httpd.conf
is Apache
‘s main configuration file by default. It will then call out other files and directories via Include
and IncludeOptional
directives which is meant to simplify the main configuration file, and the structure wildly varies between platforms.
httpd.conf
itself is located differently between platforms. These are some of the known locations;
Platform | Location |
---|---|
xampp | {installation directory}/apache/conf/httpd.conf |
macOS | /private/etc/apache2/httpd.conf |
homebrew | /usr/local/etc/apache2/2.4/httpd.conf |
Debian/Ubuntu | /etc/apache2/httpd.conf |
RedHat/CentOS/Fedora | /etc/httpd/conf/httpd.conf |
If your platform of choice is not on the list, simply run httpd -V
from the terminal and look for SERVER_CONFIG_FILE
.
# httpd -V Server version: Apache/2.4.25 (Unix) Server built: Feb 6 2017 20:02:10 Server's Module Magic Number: 20120211:67 Server loaded: APR 1.5.2, APR-UTIL 1.5.4 Compiled using: APR 1.5.2, APR-UTIL 1.5.4 Architecture: 64-bit Server MPM: prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FLOCK_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/bin/suexec" -D DEFAULT_PIDLOG="/private/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
Different platform might use different binary names such as apache
, apache2
, apachectl
or apache2ctl
Use grep
to get only the relevant line.
# httpd -V | grep SERVER_CONFIG_FILE -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
Combine the output for both HTTPD_ROOT
and SERVER_CONFIG_FILE
If the output doesn’t provide absolute full path of the configuration file.