Apache Web Server -  How to change URL default directory / webpage?

Posted on 2012-03-31
Last Modified: 2012-04-01
Just set up a LAMP stack. Default web page is index.html found in:
but I want to change it to:

Can anyone advise?

Question by:Jason210
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 17

Accepted Solution

Anuroopsundd earned 500 total points
ID: 37790666
make the changes in /etc/apache2/httpd.conf to Document root to whatever directory you want to.
 if this file is not available then make the changes in  default-server.conf
LVL 11

Author Comment

ID: 37790733
Since I'm using a machine image then the directory is slightly different:


In there i changed the DocumentRoot to var/www/html/moodle

Moodle is the web application folder. However, it does not seem to be working. Is there anything else that needs changing in this appache configuration file?
LVL 17

Expert Comment

ID: 37790735
Did you restarted the apache services?
Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

LVL 17

Expert Comment

ID: 37790743
just edit /sites-available/default

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/

and comment out #RedirectMatch ^/$ /apache2-default/
LVL 51

Expert Comment

ID: 37790891
# you missed the leading / in
DocumentRoot to /var/www/html/moodle

Expert Comment

by:Jayachandran Palanisamy
ID: 37791190
Could you please which version of Linux that you are using and how you installed Apache(Rpm/Tar/deb)?

LVL 11

Author Comment

ID: 37792974
It's deployed as an image using Amazon Web Services. The image is working fine, but I have this splash screen that I want to avoid.

So I edit the httpd.conf file by changing these lines.

DocumentRoot  "/path/to/index/page"
<Directory "/path/to/index/page">

Obviously substituting that with real information.

The funny thing is it works until I reboot the server (which I do when I make an image) and the it just craters with error 500.

This is Unbuntu 10.04, and Apache2.

@ahoffman - I didn't miss the leading slash on the conf file.
LVL 11

Author Comment

ID: 37793199
It seems that it's the application that is causing this error, the index.php file in the moodle folder.

As a test, I dropped an ordinary index.html file in there it worked.

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question