0

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!

3
  • Modify the httpd.conf file. – ceejayoz Feb 2 '16 at 17:50
  • Thanks! But what exactly to modify in httpd.conf? – The Bahree Feb 2 '16 at 18:30
  • That 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. – ceejayoz Feb 2 '16 at 18:57
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.