Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Firstly, I'm guessing you have built apache from source - was there a specific reason for doing this? I usually find systems are a lot more manageable if you use the standard distribution packages or use new packages from other repos if you need later versions.</p> <p>If you don't have a specific need for using locally-built apache, I'd recommend removing it then installing apache using the normal CentOS repositories.</p> <p>Next (or first, if you are staying with the locally-built apache), run: <code>httpd -V</code></p> <p>For example, one of my systems returns:</p> <pre><code>[me@here ~]# httpd -V Server version: Apache/2.2.3 Server built: Jun 6 2012 10:00:36 Server's Module Magic Number: 20051115:3 Server loaded: APR 1.2.7, APR-Util 1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -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=128 -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" </code></pre> <p>The output will tell you where its true config file is, in this case /etc/httpd/conf/httpd.conf - that way you'll know which config is the one actually being used.</p> <p>Once you know which config files are being used, you can check them to see where the document root is - it might be in <code>/var/www/html/</code> instead of <code>/usr/local/apache2/htdocs</code> or just about anywhere.</p> <p>When you know where the document root is, then check and make sure the files and directories are readable by apache (or whatever user apache is running as - the first column from <code>ps aux | grep httpd</code> will tell you that)</p> <p>Next check the logfiles, typically <code>/var/log/httpd/error_log</code> and also the system logs in <code>/var/log/messages</code> and <code>/var/log/secure</code></p> <p>Lastly, if you are running a recent CentOS which has SELinux enabled, and you have built apache yourself you'll almost certainly be in a world of pain. You can try <code>getenforce</code> to see if SELinux is active, and <code>setenforce 0</code> to disable it (for testing).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload