Mailinglist Archive: opensuse (1231 mails)

< Previous Next >
Re: [opensuse] own environment variables in init scripts
  • From: Meike Stone <meike.stone@xxxxxxxxxxxxxx>
  • Date: Tue, 5 Mar 2013 15:45:21 +0100
  • Message-id: <>
2013/3/5 Anton Aylward <opensuse@xxxxxxxxxxxxxxxx>:
Meike Stone said the following on 03/05/2013 03:40 AM:

Last question. Should I only avoid to set global variables, or is it
in general not recommended to use env variables with apache.

And in that wording you have it.

It seems to me that you are confusing 'variables' - that which gets
altered - with 'settings' - which don't.

If I'm understanding correctly, all this is in the context of Apache and
web services and not in the general context of J Random Program running
on the machine or cluster.

Yes and no. I like to set environment variables only for pathes, where
logging files can be placed (APACHE_LOG).
Accessed from vhost like:
CustomLog ${APACHE_LOG}/host1-access.log combined
But the same logging files are analyzed from other tools. So this
tools use the same Path (and so environment variable

HOSTNAME is not a "global variable", it is a host level setting.

The example "HOSTNAME" looks for me now as the absolutely worst case
of example I ever have chosen.
I only used the example, to show an environment variable, that is set
up right from the beginning of rc. So "HOSTNAME" is available on all
init scripts.
HOSTNAME has nothing to do what I want do, it was only an example for
a variable ...

**** sorry for all the confusing ****

How Apache works together with hostnames and virtual host, that is
clear for me, also how name resolving works and how apache knows,
which vhost is responsible for a http(s) request. It is also important
to know that, because we use SSL and care for rfc4366 and SNI ;-)

I use this variables to set path variables for eg. logfiles,
certificates. If you have eg. 100 vhots, it is really easier to manage

This sounds like the way one of the ISPs I use for web services,
Dreamhost, has it set up. I gather its a pretty normal way to set up
such a service.

Thats what I thought variables are for.

My colleges, who are responsible for this vhosts, only get the
variables. Configuration for pathes (eg. other mountpoint ..) changes,
so I only have to change the environment variables.
What makes it so dangerous to us this mechanism, provided by apache,
to use for set logfile path?

I don't think its dangerous.

Thanks, was confused, why I should not do that..

I think your understand of Apache and
vhosts is getting confused with that of a generic server.

No, I know how apache handles vhosts an generic servers :-)
(I work since 1993 with Unix and Linux ;-))

So I'm in the same situation as the colleagues you mention.
I only get the end result of what the 'automated sysadmin' that is the
scripts behind cPanel sets. I don't have the authority to alter the
vhosts.d/* entries for the various domains and services
I've set up using cPanel.

My colleagues have the permission to do that, they deliver their own
"vhost" configfile for the vhost,
one restriction is, not to use absolute path names, instead use this
environment variables,
to give me the possibility, to change this if necessary.

(All web applications are written from the developer are packed in rpm.)

Thanks for you detailed explanation and sorry for confusions

kindly regards Meike
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >