Showing posts with label APACHE. Show all posts
Showing posts with label APACHE. Show all posts

Tuesday, February 10, 2015

[SOLVED] /httpd.conf: ServerRoot must be a valid directory

ERROR

httpd.conf: ServerRoot must be a valid directory

REASON

Actual apache server installation path not set properly.

SOLUTION

  1. Open the file httpd.conf from the apache zip extracted path, say: c:\ranjith\softies\httpd-2.4.12-x86\Apache24
  2. Change the Define SRVROOT "/Apache24"
into
Define SRVROOT "c:/ranjith/softies/httpd-2.4.12-x86/Apache24"

How to install apache http server in windows 7

Below steps can help to install and run the apache http server in windows7.


Step 1

download the latest apache http server version @ http://httpd.apache.org/download.cgi


Step 2

  • unzip the file httpd-2.4.12-x86.zip (default path would be "c:/Apache24")  

  • if you want to extract into some other folder like "c:\ranjith\softies\"

  • Change this location in httpd.conf file also (Define SRVROOT "ranjith/softies/Apache24")


Step 3

Open the command prompt (run as administrator) and execute the below command:

cd c:/ranjith/softies/Apache24


Step 4

Install apache server by executing below command:

httpd -k install


Step 5

Start apache server using below command:

httpd -k start