httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Devos" <>
Subject Re: [users@httpd] Documentation for /etc/sysconfig/httpd file
Date Fri, 05 Jun 2015 12:54:25 GMT
So, if I understand this correctly I should be putting my changes in
"/usr/sbin/apachectl" and not "/etc/sysconfig/httpd". 

So if I want to have a variable available to me in httpd.conf that contains
the server's host name that I am running on, what do I need. I have tried
variable=$(hostname) and variable=`hostname` and when I use that variable in
httpd.conf is always resolves to the actual literal "$(hostname)" or

The naming convention for our hostnames tells us if it is a development server
or a production server. I want to use that to create http.conf files that are
more generic across all our apache servers.

------ Original Message ------
Received: 01:50 PM CDT, 06/03/2015
From: Andy Wang <>
To: <>
Subject: Re: [users@httpd] Documentation for /etc/sysconfig/httpd file

On 06/03/2015 10:31 AM, Jens-U. Mozdzen wrote:
> Hi Dirk,
> Zitat von Dirk Devos <>:
>> 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
> 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.
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 
environment.  So if the particular VARNAME value is actually USED by the 
distro init scripts and passed into it's httpd configuration, it will be 
used.  If it's not, then it doesn't actually have any impact at all.  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.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message