Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 67237

Summary: httpd does not read correct httpd.conf file
Product: [Retired] Red Hat Linux Reporter: Joseph Tate <jtate>
Component: apacheAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-21 14:28:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joseph Tate 2002-06-21 13:58:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET 
CLR 1.0.3705)

Description of problem:
I have /etc/httpd/conf/httpd.conf linked to /opt/d2/web/conf/httpd-web.conf.  
When I run service httpd start, I get the following lines 
in /var/log/httpd/error_log:

fopen: No such file or directory
httpd: could not open document config file /opt/d2/web/conf/httpd.conf

Of course there is no /opt/d2/web/conf/httpd.conf file.  But the linked to 
httpd-web.conf file is there.

Another bit of information that might be useful: I've got /opt/d2/web/conf 
mounted off an NFS server.

This worked properly under apache-1.3.22-1.7.1, but now does not work under 
1.3.22-5.7.1.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
0.  service httpd stop
1.  mv /etc/httpd/conf/httpd.conf /tmp/conf/httpd-tmp.conf
2.  ln -s /tmp/conf/httpd-tmp.conf httpd.conf
3.  service httpd start
4.  check error_log

Actual Results:  Lines as described above are added to error_log, apache is 
not started

Expected Results:  Apache should have started as it did in 1.3.22-1.7.1.

Additional info:

Comment 1 Joseph Tate 2002-06-21 14:28:25 UTC
Ok, some new information:

ServerRoot is set to /opt/d2/web instead of /etc/httpd.
/etc/httpd/conf/httpd.conf is read once, ServerRoot is set, then httpd.conf is 
read again, but not as httpd-web.conf.  Since the ServerRoot has changed it 
looks for conf/httpd.conf within the ServerRoot.

httpd.conf shouldn't need to be read again, and if it is, it needs to read the 
same file as originally read, not some hard coded file.


Comment 2 Joe Orton 2002-07-01 13:16:03 UTC
This is because the config file is hard-coded as a path name relative to the
server root. If you want use a server-root other than the default, then pass an
option like "-d /opt/d2/web" argument when running httpd. (You'll have to do
that by modifying /etc/init.d/httpd because of bug 60281, though)