Solved

Changing Default Webroot for an Apache 2.0 server on Linux Redhat

Posted on 2008-06-20
1
2,520 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now