You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by sathya sai <sa...@gmail.com> on 2009/03/11 09:43:43 UTC

[users@httpd] Regarding "" directive in httpd.conf

Hi Apache folks,

This is regarding "<IfDefine>" directive in httpd.conf for apache-2.2.x .

My httpd.conf had all SSL related configuration wrapped under <IfDefine SSL>
as below,

<IfDefine SSL> ....
SSLCertificateFile conf/ssl/server.crt SSLCertificateKeyFile
conf/ssl/server.key
....
...
</IfDefine>

Till now based on the system configuration, I would decide if I need to
start apache with -DSSL or not (to enable/disable https feature).

I would need to know if there is any other alternative means by which,
instead of defining the macro from command line (like -DSSL), can it be
defined in the httpd.conf itself ? So that I can just start apache everytime
by just running httpd.exe instead of caring on command line options ?

Please do let me know your views on this.

Thanks and regards,
Sathya

Re: [users@httpd] Re: Regarding "" directive in httpd.conf

Posted by André Warnier <aw...@ice-sa.com>.
sathya sai wrote:
[...]
Not that I know of.

You can always start apache with a different httpd.conf configuration 
file, also using a command-line parameter.
So you could have a httpd-ssl.conf and a httpd-nossl.conf configuration 
file, and decide to start Apache with either one or the other, through a 
  "-f" command-line switch.
But I don't see that as an advantage, compared to using the "-DSSL" 
switch or not.

I must say however that I still fail to see the point..

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Regarding "" directive in httpd.conf

Posted by sathya sai <sa...@gmail.com>.
Presently based on the existance of SSL cert/key files, my application
decides either to start apache with (or) without "-D SSL" command line.  And
the corresponding derivatives for SSL configuration being wrapped under
"<IfDefine SSL>" clause. Due to some architectural constraint in my
application, I am planning to find an alternative way to dynamically define
"SSL" parameter in httpd.conf itself (with some derirather rather than
through command line option.

My doubt is, suppose if I have any derivatives in httpd.conf wrapped under
"<IfDefine ABC>" clause. Then, is command line option (-DABC) the one & only
means to define(enable) "ABC" paramater?

Or is there any altervative approach which allows me to define "ABC" through
httpd.conf? And achieve the similar functionality that "-DABC" would do...

(P.S: I feel that commenting & Uncommenting that IfDefine SSL in httpd.conf
wouldn't be robust enough).
Could you please help me out with your thoughts on this.

On Wed, Mar 11, 2009 at 2:59 PM, André Warnier <aw...@ice-sa.com> wrote:

> sathya sai wrote:
> [...]
> Well of course you can remove the <IfDefine ..> </IfDefine> lines from your
> httpd.conf, and comment/uncomment the corresponding lines themselves.  But
> it is a lot less flexible.
> Also, depending on your platform and package setup, there may be other ways
> to achieve this.  But since you did not tell us these details, it is
> difficult to suggest something.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Regarding "" directive in httpd.conf

Posted by André Warnier <aw...@ice-sa.com>.
sathya sai wrote:
[...]
Well of course you can remove the <IfDefine ..> </IfDefine> lines from 
your httpd.conf, and comment/uncomment the corresponding lines 
themselves.  But it is a lot less flexible.
Also, depending on your platform and package setup, there may be other 
ways to achieve this.  But since you did not tell us these details, it 
is difficult to suggest something.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Regarding "" directive in httpd.conf

Posted by sathya sai <sa...@gmail.com>.
To be more clearer, it would be really helpful if you could let me know the
means by which we can dynamically update the httpd.conf to enable/disable a
particular marco similar to "-DSSL" which does in command line.

On Wed, Mar 11, 2009 at 2:13 PM, sathya sai <sa...@gmail.com>wrote:

> Hi Apache folks,
>
> This is regarding "<IfDefine>" directive in httpd.conf for apache-2.2.x .
>
> My httpd.conf had all SSL related configuration wrapped under <IfDefine
> SSL> as below,
>
> <IfDefine SSL> ....
> SSLCertificateFile conf/ssl/server.crt SSLCertificateKeyFile
> conf/ssl/server.key
> ....
> ...
> </IfDefine>
>
> Till now based on the system configuration, I would decide if I need to
> start apache with -DSSL or not (to enable/disable https feature).
>
> I would need to know if there is any other alternative means by which,
> instead of defining the macro from command line (like -DSSL), can it be
> defined in the httpd.conf itself ? So that I can just start apache everytime
> by just running httpd.exe instead of caring on command line options ?
>
> Please do let me know your views on this.
>
> Thanks and regards,
> Sathya
>
>