Apache Home Directory change not registering
I went into the httpd.conf file and changed the following:
DocumentRoot "/export/prodnet/Linux Server/ProdWebRoot" <Directory "/export/prodnet/Linux Server/ProdWebRoot"> This is where the conf file along with some threads I've read told me to change this. However, it still reads files from my var/www/html directory. I've done a search on the httpd.conf file and there is no longer a reference to the old location. I've restarted apache, but can't get this figured out. I'm a newbie to Linux, (I've played around with Ubuntu before, but now work has me using Red Hat Server 5 (without the support package btw)). Any help is greatly appreciated. Thank You, David Singleton |
Progress. I managed to stumble across another httpd.conf file, perhaps one that our network admin already set up on the box. It looks like everything is loading from this file. So I'm going to make the changes necessary to that file. Anyone have any suggestions on how to clean this up so that I only have ONE apache2 installation?
|
Where did you find the other httpd.conf file? My guess from your original post was a virtual host configuration issue. What directories are these files in?
-Chad |
/etc/httpd/conf
|
That's only 1 file. You said you found 2.. Also, if you look at your startup script for Apache, which file is calling for the conf file?
-Chad |
Also, this page:
http://www.linuxtopia.org/online_boo..._ch-httpd.html Has a "warning" about modifying apache conf files by hand: Quote:
|
sorry the other file is the default location for the manual installation of apache2 that I did. /usr/local/apache2/conf/
So even though i run the start command for apache at /usr/local/apache2/conf/ it is grabbing the conf file from etc/httpd/conf/ |
That's the typical way of doing it. I wouldn't go as far as saying the "correct" way, but with most distributions you'll see the configuration files in /etc for system services. In this case, /etc/httpd/conf is the typical option.
-Chad |
so then can I just delete the files located in usr/local/apache2? When I go to change/add stuff later on, I'd rather not have to deal with the confusion of having it in multiple locations.
|
You might not want to delete them. My guess is they are the source files, and when you update apache they will be replaced anyway. The confusion will wither as you learn and understand how it works. As you deal with other services as well it will help you become more accustomed to the /etc configuration files. If you really want to delete them, I would suggest moving them first. Move them to a temp location, maybe /tmp even and then wait a few days to make sure everything continues working as expected.
Check apache and see if uses other files in that location. You can probably safely remove the conf file, but I wouldn't recommend removing the entire directory and it's contents. -Chad |
All times are GMT -5. The time now is 06:28 PM. |