Fix for the “DocumentRoot must be a directory” error when changing the document root from default in the apache configuration file (httpd.conf)
I was going through this error for around 10 days now. I was setting up a new linux server for test on a Red Hat Linux Enterprise Edition 5. I changed the documentroot from “/etc/httpd” to “/web/portal” and when I restarted the apache server it gave me the error saying “DocumentRoot must be a directory”. I made sure I had the permissions right on the folder and the folder existed but the error seemed to persist.
I went through many forums and then came across this post. The solution was to make sure the Security settings for the linux system were setup properly. So what was needed was to adjust the setting in the security level settings using the command system-config-securitylevel (or redhat-config-securitylevel) and then the server started without any problem.
I am learning usage of VMware to setup multiple servers on a single physical system.
After working on web development on a localhost and pushing changes to a staging then production server for a long time, now I am going to learn how to setup a developer server, staging server,Â production server, database servers and other required servers on a given number of resources optimally using Virtual Machines.
Currently at work we use VMware on host systemsÂ and run multiple servers on the same system making optimal usage of the resources. First thing I am doing is reading up on technical information about VMware here. Then I will be learning how to set ip addresses within a network and assign DNS to them. Then I will install a linux server onÂ one of the VM clients and setup a server etc..
I will be doing all this in my laptop and from now on instead of installing linux on a seperate partition as I have been doing for years, I will be installing it on a VM host on my laptop and will operate them from my windows like I always wanted to do (without rebooting the system).
I have played around with these virtual pc stuff in my school days but never went too deep into it. This is the time when I need to go into it deep. I am very excited to experiment with all this. I should have learned all these earlier but never mind. Its never too late to learn 🙂
My project which was written using Codeigniter framework used php short tags and I did some research and setup my localhost to work with it.
PHP short tags refer to the alternative way of writing php tags in a web script. i.e.Â <?= [function/variable] Â ?>instead of <? php Â echo [function/variable] ?>
Today while working on one my projects, I found that I needed to turn on PHP SHORT TAGS in the php.ini to make it work properly.Â The project uses codeigniter framework and the previous developer used php short tags in his code which was not setup on my localhost. So I enabled it by editing the php.ini file and setting the short_open_tag variable to on and then restarted the apache server and it worked.