LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Home Directory change not registering (https://www.linuxquestions.org/questions/linux-newbie-8/apache-home-directory-change-not-registering-694496/)

DavidSingleton 01-02-2009 10:03 AM

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

DavidSingleton 01-02-2009 10:31 AM

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?

MasterC 01-02-2009 10:33 AM

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

DavidSingleton 01-02-2009 10:51 AM

/etc/httpd/conf

MasterC 01-02-2009 10:57 AM

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

MasterC 01-02-2009 11:01 AM

Also, this page:
http://www.linuxtopia.org/online_boo..._ch-httpd.html

Has a "warning" about modifying apache conf files by hand:
Quote:

If using the graphical HTTP Configuration Tool (system-config-httpd ), do not hand edit the Apache HTTP Server's configuration file as the HTTP Configuration Tool regenerates this file whenever it is used.
-Chad

DavidSingleton 01-02-2009 11:06 AM

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/

MasterC 01-02-2009 11:10 AM

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

DavidSingleton 01-02-2009 11:14 AM

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.

MasterC 01-02-2009 11:28 AM

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.