Bug 67237 - httpd does not read correct httpd.conf file
Summary: httpd does not read correct httpd.conf file
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-06-21 13:58 UTC by Joseph Tate
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-06-21 14:28:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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 

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

How reproducible:

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)

Note You need to log in before you can comment on or make changes to this bug.