If you believe my posts will help someone please feel free to share.

Important Apache Files and Directories

We have already learned that Apache is configured by default to deliver web files from

/var/www/html

Here are the locations of other important files and directories

Apache Important Files and Directories

  • The default server root directory (top level directory containing configuration files): /etc/httpd
  • The main Apache configuration file: /etc/httpd/conf/httpd.conf
  • Additional configurations can be added in: /etc/httpd/conf.d/
  • Apache virtual host configuration file: /etc/httpd/conf.d/vhost.conf
  • Configurations for modules: /etc/httpd/conf.modules.d/
  • Apache default server document root directory (stores web files): /var/www/html

 

From the command line we can see


[ec2-user@ip-172-30-1-107 httpd]$ ls
conf conf.d logs modules run

Looking a bit closer by applying the -la flag to ls


[ec2-user@ip-172-30-1-107 ~]$ cd /etc/httpd
[ec2-user@ip-172-30-1-107 httpd]$ ls -la
total 16
drwxr-xr-x 4 root root 4096 Feb 16 21:18 .
drwxr-xr-x 79 root root 4096 Feb 16 21:18 ..
drwxr-xr-x 2 root root 4096 Feb 16 21:18 conf
drwxr-xr-x 2 root root 4096 Feb 16 21:18 conf.d
lrwxrwxrwx 1 root root 14 Feb 16 21:18 logs -> /var/log/httpd
lrwxrwxrwx 1 root root 24 Feb 16 21:18 modules -> /usr/lib64/httpd/modules
lrwxrwxrwx 1 root root 14 Feb 16 21:18 run -> /var/run/httpd