Bug 67237 - httpd does not read correct httpd.conf file
httpd does not read correct httpd.conf file
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-21 09:58 EDT by Joseph Tate
Modified: 2007-04-18 12:43 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Joseph Tate 2002-06-21 09:58:00 EDT
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 10:28:25 EDT
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 09:16:03 EDT
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.