How can I find out the path of the httpd.conf file on apache (PHP)? I do not know whether my script will be runned in windows apache or linux, i need to know where i can find th
httpd -V
It will shows all compile settings, in the middle of the results you will find:
/usr/local/apache
conf/httpd.conf
Apache conf file:
/usr/local/apache/conf/httpd.conf
root@host [~]# httpd -V
Server version: Apache/2.4.16 (Unix)
Server built: Dec 15 2015 10:01:02
Cpanel::Easy::Apache v3.32.6 rev9999
Server's Module Magic Number: ...
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 disabled)
-D APR_USE_SYSVSEM_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/local/apache"
-D __SUEXEC_BIN="/usr/local/apache/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"