Bug 67237 - httpd does not read correct httpd.conf file
Summary: httpd does not read correct httpd.conf file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2002-06-21 14:28:31 UTC
Embargoed:


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 
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)



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