You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Brooks <ja...@eroi.com> on 2017/10/25 04:12:39 UTC
[users@httpd] How can I detect if SSLEngine is ON?
Hello,
I am using virtualmin to run my site, and there is no method to set an apache template separately for an ssl site. that i am aware of. I am asking them this right now.
Independently, my question to this list is “in the apache configuration, how do I tell if SSLEngine is set to ON”. I know how to determine if mod_ssl is loaded: that is not what I want here: I want to detect if the ssl-engine has been turned on in a particular virtual host.
If I can detect this in the apache configuration, I can enable configuration lines that otherwise wouldn’t make sense.
Thank you for your time!
—jason
Jason Brooks Systems Administrator
eROI Performance is Art.
m: 505 nw couch #300 w: eroi.com <http://eroi.com/>
t: 503.290.3105 f: 503.228.4249
fb: fb.com/eROI <http://www.facebook.com/eROI>
Re: [users@httpd] How can I detect if SSLEngine is ON?
Posted by Jason Brooks <ja...@eroi.com>.
Sweet Rainer, I will try that and get back to you!
—jason
Jason Brooks Systems Administrator
eROI Performance is Art.
m: 505 nw couch #300 w: eroi.com <http://eroi.com/>
t: 503.290.3105 f: 503.228.4249
fb: fb.com/eROI <http://www.facebook.com/eROI>
> On Oct 25, 2017, at 6:34 AM, Rainer Canavan <ra...@sevenval.com> wrote:
>
> [...]
>> But, I don’t just need to know if a module is available: once the module is loaded, its available for all virtualhosts. I need to know if the SSLEngine has been enabled within a virtualhost so I can do something like the following:
>
> mod_ssl sets the environment variable HTTPS to "on" if the current
> request was received via https. You should be able to use the "env="
> conditions for Header set to get your example to work as intended.
>
> https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#envvars
>
> rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
Re: [users@httpd] How can I detect if SSLEngine is ON?
Posted by Rainer Canavan <ra...@sevenval.com>.
[...]
> But, I don’t just need to know if a module is available: once the module is loaded, its available for all virtualhosts. I need to know if the SSLEngine has been enabled within a virtualhost so I can do something like the following:
mod_ssl sets the environment variable HTTPS to "on" if the current
request was received via https. You should be able to use the "env="
conditions for Header set to get your example to work as intended.
https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#envvars
rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How can I detect if SSLEngine is ON?
Posted by Jason Brooks <ja...@eroi.com>.
Hello Daniel,
Thank you for your reply:
What I need is for the apache configuration to know, not just me. So for instance:
I can detect if mod_info is loaded with "<IfModule mod_info.c>”
or if mod_ssl is loaded with "<IfModule mod_ssl.c>”.
But, I don’t just need to know if a module is available: once the module is loaded, its available for all virtualhosts. I need to know if the SSLEngine has been enabled within a virtualhost so I can do something like the following:
<ssl-engine is on>
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
Header always set X-Content-Type-Options nosniff
Header always append X-Frame-Options SAMEORIGIN
</ssl-engine is on>
Thanks!
Jason Brooks Systems Administrator
eROI Performance is Art.
m: 505 nw couch #300 w: eroi.com <http://eroi.com/>
t: 503.290.3105 f: 503.228.4249
fb: fb.com/eROI <http://www.facebook.com/eROI>
> On Oct 24, 2017, at 9:47 PM, Daniel Mailing <da...@miclub.com.au> wrote:
>
> From: Jason Brooks [mailto:jason.brooks@eroi.com <ma...@eroi.com>]
> Sent: Wednesday, 25 October 2017 12:13 PM
> To: users@httpd.apache.org <ma...@httpd.apache.org>
> Subject: [users@httpd] How can I detect if SSLEngine is ON?
> >
> >Hello,
> >
> >I am using virtualmin to run my site, and there is no method to set an apache template separately for an ssl site. that i am aware of. I am asking them this right now.
> >
> >Independently, my question to this list is “in the apache configuration, how do I tell if SSLEngine is set to ON”. I know how to determine if mod_ssl is loaded: that is not what I want here: I want to detect if the ssl-engine has been turned on in a particular virtual host.
>
> If you have shell access to the server try using grep.
> grep -r SSLEngine /etc/httpd/
>
> >If I can detect this in the apache configuration, I can enable configuration lines that otherwise wouldn’t make sense.
> >
> >Thank you for your time!
> >
> >—jason
> >
[users@httpd] How can I detect if SSLEngine is ON?
Posted by Daniel Mailing <da...@miclub.com.au>.
From: Jason Brooks [mailto:jason.brooks@eroi.com]
Sent: Wednesday, 25 October 2017 12:13 PM
To: users@httpd.apache.org
Subject: [users@httpd] How can I detect if SSLEngine is ON?
>
>Hello,
>
>I am using virtualmin to run my site, and there is no method to set an apache template separately for an ssl site. that i am aware of. I am asking them this right now.
>
>Independently, my question to this list is “in the apache configuration, how do I tell if SSLEngine is set to ON”. I know how to determine if mod_ssl is loaded: that is not what I want here: I want to detect if the ssl-engine has been turned on in a particular virtual host.
If you have shell access to the server try using grep.
grep -r SSLEngine /etc/httpd/
>If I can detect this in the apache configuration, I can enable configuration lines that otherwise wouldn’t make sense.
>
>Thank you for your time!
>
>—jason
>