You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Nathan Wiger <nw...@san.rr.com> on 1999/05/05 20:42:45 UTC

general/4357: apachectl can't redirect to alternate configuation file

>Number:         4357
>Category:       general
>Synopsis:       apachectl can't redirect to alternate configuation file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed May  5 11:50:00 PDT 1999
>Last-Modified:
>Originator:     nwiger@san.rr.com
>Organization:
apache
>Release:        1.3.6
>Environment:
Solaris 2.6, full patches. This is a shell script issue.
>Description:
If you use apachectl, it forces you to the default conf file. This is
probably okay most of the time, but there is a very simple (2 minute)
solution that we've implemented that saves much time and aggravation.
You just add an extra variable called CONF which stores the location
of the conf file. See below...		
>How-To-Repeat:

>Fix:
The easiest way is to add this to the top of apachectl:

# the path to your conf file
CONF=/opt/apache/conf/httpd.conf
#

Then, for each of the statements that launch Apache (4 total), simply
change them to read:

        if $HTTPD -f $CONF ; then
            echo "$0 $ARG: httpd started"


So all your doing if adding the -f $CONF to the normal 'if $HTTPD ; then'
statement. Like I said, it's easy, but makes life easier a lot of times.
If you want I will be more than happy to add the necessary changes to the
source/etc so this can happen. Thanks.

P.S. Keep up the good work, Apache rocks... :-)

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]