When trying to start Apache by using:
I get the following error in
Unable to change directory to /root
Anyone have any idea what this means?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
because you have it enabled, you need to start service using
service httpd start
edit your SELinux config and either disable it or set it to permissive:
# SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=disabled
Once changed then you will be able to start httpd using:
If you need to keep SELinux enabled, then just use the service script to start/stop/restart the service.
# service httpd start/stop/restart
The ServerRoot has apparently not been set (properly.)
If unset, this default to $HOME.
Edit httpd.conf and set a proper ServerRoot (usually /etc/httpd or /etc/apache2.)
If you want to run it without disabling SELinux, then don't try to run http start/stop command inside /root directory.
This is temporary fix but always work, just switch to /tmp (cd /tmp) and run the command to start apache (/etc/init.d/httpd start)