• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 665
  • Last Modified:

apache2 server root initiation problem

 I am running SUSE ENTERPRISE 10, with apache2.

upon running apache2 as

$httpd2 -d /usr/local/ensembl            
(to redirect apache to read the server root from the /usr/local/ensembl)

Apache2 doesnot seem to redirect and read from the directory /usr/local/ensembl but reads from /srv/www/htdocs .
however apache2 is running okay as http://localhost gives the test index page of apache.
There seems to a problem with apache redirection but I am unable to fix it.
I appreciate any help in fixing this.

- ash#
1 Solution
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Make sure apache is not running before you execute the command

`rcapache2 status`
and if it's running `rcapache2 stop`
haravallabhanAuthor Commented:
Hi, I did switch off apache before restarting again
ie i used
apache2ctl stop

but the problem persist
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
-d serverroot
              Set  the  initial  value for the ServerRoot directive to server
              root. This can be overridden by the ServerRoot directive in  the
              configuration file. The default is /usr/local/apache2.

Meaning if you have specified the ServerRoot directive in the configuration file then it will OVERRIDE whatever you put after -d.
Are you confusing ServerRoot with DocumentRoot?
Use /etc/init.d/apache scripts to start, stop apache, NOT apachectl.

You need to make your change in he DocumentRoot entry in the config file, or add a symlink and allow apache to follow symlinks.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now