Solved

Changing Default Webroot for an Apache 2.0 server on Linux Redhat

Posted on 2008-06-20
1
2,536 Views
Last Modified: 2013-11-05
Hi i'm currently running a webserver (Apache 2.0) on Linux redhat and right now it's configured so that when i type in http://myipaddress the local directory that it "points" to is /usr/local/apache/htdocs how do i change it so it points to another directory, eg /var/www/html?

thanks.
0
Comment
Question by:Senbonzakura
1 Comment
 
LVL 6

Accepted Solution

by:
psychic_zero earned 500 total points
ID: 21829098
Find httpd.conf file in your Apache web server directory, usually at /usr/local/apache/conf/ . Open the file using any text editor and find:

DocumentRoot "/usr/local/apache/htdocs"
and
<Directory "/usr/local/apache/htdocs">

Change both directory to the new webroot

DocumentRoot "/var/www/html"
and
<Directory "/var/www/html">

Save the httpd.conf file and restart the web server.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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