Apache Lounge


About Forum Index Downloads Search Register Log in  RSS Apache Lounge  

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.

Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: config file

Joined: 11 Feb 2019
Posts: 4
Location: china

PostPosted: Tue 19 Feb '19 15:53    Post subject: config file Reply with quote

I found when I use the below command to start the apache server , it can startup the apache , I would like to know where the apache config is located , I couldn't find it in the server .

Command to start apache
"apachectl -k restart"

#ps -aux |grep http

"/usr/sbin/httpd -k start"
Back to top

Joined: 27 Jun 2016
Posts: 115
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Tue 19 Feb '19 23:28    Post subject: Reply with quote

Hello Eva,

use the command "apachectl -T" which results in something like this (example from my ubuntu-16-linux-computer):
matthias@atom:~$ apachectl -V
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2018-10-10T18:59:25
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   32-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"

Concatenate HTTPD_ROOT and SERVER_CONFIG_FILE to get the location of apache's main config file. From this file other files could be included. Exclamation

Best regards
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6822
Location: Germany, Next to Hamburg

PostPosted: Wed 20 Feb '19 13:33    Post subject: Reply with quote

I think apachectl -S is the better options since it checks the vhost config, too.
Back to top

Joined: 27 Jun 2016
Posts: 115
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Wed 20 Feb '19 13:44    Post subject: Reply with quote

@James Blond:
for checking correctness of complete config you are absolutely right.
Eva was asking for the location of the config file. With "apachectl -S" I was only able to see the location of the included files, not the location of the main-config-file, which (at least on my computer) was displayed with "apachectl -V".
I think the combination of both commands is best Wink
Back to top

Reply to topic   Topic: config file View previous topic :: View next topic
Post new topic   Forum Index -> Apache