httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Jones <>
Subject Re: [users@httpd] Apache 2.4.x - Restriction of HTTPS Enforcement to external clients
Date Wed, 06 Jun 2018 07:43:40 GMT
I think you can add an additional RewriteCond under the first:

RewriteCond %{HTTP_HOST} ^www\.example\.com$

Matt Jones
Senior Network Systems Specialist

On 05/06/2018, 19:26, "Luther Enahoro" <<>>


I have a need to restrict https enforcement on my Apache installation to only external clients.

The server hosting the Apache instance is accessible over the internet via a domain<>
while the same server is accessed internally/locally (LAN) by application servers via http://172.16.10.x/

Whenever https is enforced, the internal applications become unstable because they have not
been programmed to make https calls and cannot deal with the https redirection done by Apache.
However, eternal clients accessing the server via the internet using the domain name are fine.

Find below the details of the Apache instance and current configuration driving https enforcement:

Server version: Apache/2.4.23 (Unix)

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

I need help on how to configure Apache to only apply the enforcement of https to calls via
the internet using the domain name. In other words, all http calls to the server using the
internal local server IP should not be redirected to https.


Luther Enahoro


Disclaimer: The information contained in this e-mail message and any attachment is for designated
recipient(s) ONLY and may contain privileged, proprietary, or private information. It is for
the exclusive use of the intended recipient(s). If the recipient of this message is not the
above-named intended recipient(s), you are hereby notified that any dissemination, copy or
disclosure of this communication is strictly prohibited. If you have received this e-mail
in error please notify the sender and purge the communication immediately without making any
copy or distribution.

University of Huddersfield inspiring tomorrow's professionals.

This transmission is confidential and may be legally privileged. If you receive it in error,
please notify us immediately by e-mail and remove it from your system. If the content of this
e-mail does not relate to the business of the University of Huddersfield, then we do not endorse
it and will accept no liability.

View raw message