I am confused. Based on the documentation on apache's website we need to use 
"apachectl" but in that module it says to use "apachectl". So what is the right 
place.

I realize that the variables are different and that was done on purpose. I 
wanted to compare the two ways of assigning a value. 

******   From http://httpd.apache.org/docs/2.4/programs/apachectl.html
apachectl is a front end to the Apache HyperText Transfer Protocol (HTTP) 
server. It is designed to help the administrator control the functioning of the 
Apache httpd daemon.
The apachectl script can operate in two modes. First, it can act as a simple 
front-end to the httpd command that simply sets any necessary environment 
variables and then invokes httpd, passing through any command line arguments. 
Second, apachectl can act as a SysV init script, taking simple one-word 
arguments like start, restart, and stop, and translating them into appropriate 
signals to httpd.
If your Apache installation uses non-standard paths, you will need to edit the 
apachectl script to set the appropriate paths to the httpd binary. You can also 
specify any necessary httpd command line arguments. See the comments in the 
script for details.
The apachectl script returns a 0 exit value on success, and >0 if an error 
occurs. For more details, view the comments in the script.


******   So I found the "apachectl" file in "/usr/sbin/" and in the file I 
found the following.
if [ "x$2" != "x" ] ; then
    echo Passing arguments to httpd using apachectl is no longer supported.
    echo You can only start/stop/restart httpd using this script.
    echo If you want to pass extra arguments to httpd, edit the
    echo /etc/sysconfig/httpd config file.
fi

-----Original Message-----
From: Jens-U. Mozdzen [mailto:jmozd...@nde.ag] 
Sent: Wednesday, June 03, 2015 2:45 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Documentation for /etc/sysconfig/httpd file

Hi Andy,

Zitat von Andy Wang <aw...@ptc.com>:
> On 06/03/2015 10:31 AM, Jens-U. Mozdzen wrote:
>> Hi Dirk,
>>
>> Zitat von Dirk Devos <dirk.de...@usa.net>:
>>> Hi,
>>>
>>> I am running Redhat 7.1 and apache 2.4 but I am not able to find any 
>>> documentation on the "/etc/sysconfig/httpd" file.
>>> [...]
>>> This works.
>>>
>>> HTTPD_ENV_NAME="devl"
>>>
>>>
>>> I have tried the following with no success.
>>>
>>> HTTPD_HOSTNAME=`hostname`
>>> HTTPD_HOSTNAME=${hostname}
>>> HTTPD_HOSTNAME=$(hostname)
>>
>> the first an the last line should work (while I prefer the $() 
>> version)
>> - what catches the eye is the change in variable names 
>> (HTTPD_ENV_NAME vs. HTTPD_HOSTNAME)...
>>
>> Regards,
>> Jens
>>
>
> Couple of starter points
> 1) the apache httpd project is not responsible for the distribution 
> specific builds.  The /etc/sysconfig/httpd thing is a red hat-ism.

just for the records, you'll see that with SUSE Linux Enterprise
(SLES) as well, at least up to (still widely used) SLES11.

> 2) you should contact red hat for support on that
>
> In general /etc/sysconfig/httpd (which at some point will be deprected 
> -it already is with fedora as systemd generally doesn't use 
> /etc/sysconfig files) are simply ./sourced into the init script

well, had you redirected the OP to some shell scripting list, I'd have agreed, 
but...

> [...] So you'll want to look more closely at the init script and the 
> httpd configuration files to even know if what you're trying to do in 
> /etc/sysconfig/httpd is doable.

...obviously he already found a working way of setting the value statically, 
but didn't manage to do so dynamically. Hence I thought it polite to point out 
that mismatch in variable names between these two variants.

Regards,
Jens


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to