Solved

Changing Default Webroot for an Apache 2.0 server on Linux Redhat

Posted on 2008-06-20
1
2,550 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
[X]
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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

752 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