Operating System - OpenVMS
1753784 Members
6666 Online
108799 Solutions
New Discussion юеВ

CSWS 2.1-1 dynamic config file

 
SOLVED
Go to solution
Dieter Rossbach
Regular Advisor

CSWS 2.1-1 dynamic config file

After some hours of reading in the internet with no result, here is my question:

I want to have a common httpd.conf in a cluster environment with conditional parts depending a predefined variables or the system name or ...

Dieter
6 REPLIES 6
Jan van den Ende
Honored Contributor

Re: CSWS 2.1-1 dynamic config file

Dieter,

>>>
I want to have a common httpd.conf in a cluster environment with conditional parts depending a predefined variables or the system name or ...
<<<

It may or may not be useful to you, but the standard VMS way to such effect would be to make a SPECIFIC

I am not aware of CSWS CONF include-file facilities, but if such exists, then use a common main file with some specific includes.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Dieter Rossbach
Regular Advisor

Re: CSWS 2.1-1 dynamic config file

> I am not aware of CSWS CONF include-file facilities, but if such exists, then use a common main file with some specific includes.

CONF include facilities exist and I use them. I have a common httpd.conf and includes in the specific area.


Hoff
Honored Contributor

Re: CSWS 2.1-1 dynamic config file

Haven't tried this: Set up the include as you normally would, but set up a logical name redirect the file or th directory before Apache is started.

The command apachectl configtest will tell you where it's looking for the configuration file...

Include conf/mumble.conf

I'd expect to need to experiment with this stuff to see just what gets translated. This might end up needing to add another translation to APACHE$COMMON to aim at the local directory.

Not sure how much of this would be considered supported by HP.

One approach that almost certainly would be supported is the -D parameter directive on the SWS server startup command, and an IfDefine block in the configuration file. Set the parameter in using a DCL lexical and DCL if-else-endif logic and such, and off you go...

There's also the virtual host stuff, which is what I use...
Dieter Rossbach
Regular Advisor

Re: CSWS 2.1-1 dynamic config file

und I use virtual hosts, of course.

Actually, I server about 20 websites with csws using common- and specific config files, using java, php, mysql, oracle, rdb ...

I have the httpd.conf in the specific path (needs a little modification in the apache startup and shutdown procedures) and the production includes in the common part. The production includes are in the common part, and for every include i want to modify, O have an additional one in the local specific path, overwriting the common on for that node, e.g. switching of support for a website or proxy serving with empty config files. But that's a lot of renaming, creating and deleting files, when I change configurations. I'm looking for a simpler way, easer to maintain, easier to document.

Someting like having an include file with variables, and use these variables to switch on or of special features with som if constructs in the config files.

like this

setup_file:
$ on = 1
$ off = 0
$ website_a == on
$ website_b == off
$ proxy == on

config file

include setup_File

website_a

NameVirtualHost 12.34.56.80:80
...



Dieter
Hoff
Honored Contributor
Solution

Re: CSWS 2.1-1 dynamic config file

$ hpptd -D yournodeparam

and over in the conf files...


Dieter Rossbach
Regular Advisor

Re: CSWS 2.1-1 dynamic config file

Works, thanks

Dieter