Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing Default Webroot for an Apache 2.0 server on Linux Redhat

Posted on 2008-06-20
1
Medium Priority
?
2,583 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
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). #…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

721 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