21 apache basic config and website | apache2ctl -V | grep SERVER_CONFIG_FILE | /etc/httpd/conf/httpd.conf

[root@localhost system]# which httpd
/sbin/httpd

find from which rpm package installation comes
[root@localhost system]# rpm -qf /sbin/httpd
httpd-2.4.6-45.el7.centos.4.x86_64

show configuration files
[root@localhost system]# rpm -qc httpd
/etc/httpd/conf.d/autoindex.conf
/etc/httpd/conf.d/userdir.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf.modules.d/00-dav.conf
/etc/httpd/conf.modules.d/00-lua.conf
/etc/httpd/conf.modules.d/00-mpm.conf
/etc/httpd/conf.modules.d/00-proxy.conf
/etc/httpd/conf.modules.d/00-systemd.conf
/etc/httpd/conf.modules.d/01-cgi.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/logrotate.d/httpd
/etc/sysconfig/htcacheclean
/etc/sysconfig/httpd
[root@localhost system]# 

if anything should be started different in apache, go to
/etc/sysconfig/httpd

important configuration file, listen port, include modules
/etc/httpd/conf/httpd.conf

additional configuration
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf.modules.d/00-dav.conf
/etc/httpd/conf.modules.d/00-lua.conf
/etc/httpd/conf.modules.d/00-mpm.conf
/etc/httpd/conf.modules.d/00-proxy.conf
/etc/httpd/conf.modules.d/00-systemd.conf
/etc/httpd/conf.modules.d/01-cgi.conf

if we update any application, original config is saved as *.rpmsave




/etc/httpd/conf/httpd.conf
parameters

DocumentRoot "/var/www/html"

[root@localhost html]# ls -lart
-rw-r--r--. 1 root root 21 Sep 20 17:00 index.html
[root@localhost html]# pwd
/var/www/html
[root@localhost html]# 


elinks http://localhost

How to find out which httpd.conf apache is using at runtime

apache2ctl -V | grep SERVER_CONFIG_FILE




Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all