How to configure Apache to serve default Index.html file stored on attached AWS EBS volume?
In most cases httpd.conf is located in /etc/apache2/conf/httpd.conf You need to change the DocumentRoot setting in your httpd.conf file. More information here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-apache-config.html
You should see something like
<Directory "/var/www/html">
- change it to
<Directory "/mountedEBS/desiredfolder">
In order to apply changes, don't forget to restart your Apache.
Related videos on Youtube
The Bahree
Updated on September 18, 2022Comments
-
The Bahree over 1 year
I have a AWS EC2 Linux VM with Apache installed, and my requirement to configure Apache so that the default Index.html file served is the one from the attached EBS volume (where I have already stored it), instead of from the default /var/www/html directory configured as DocumentRoot in Apache. Please help. Thanks!
-
ceejayoz over 8 yearsModify the httpd.conf file.
-
ceejayoz over 8 yearsThat depends on its current contents. Read it and work it out. This is very basic stuff and you're going to have to understand what it does to run an Apache server.
-