× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 3/5/2019 9:37 AM, Justin Taylor wrote:
I'm trying to allow optional HTTPS for an existing Apache server, but
I can't seem to make it optional. If SSL is Disabled or Optional,
HTTPS won't connect. If SSL is Enabled, HTTP won't connect. How can
I get both to function?

I usually setup two virtual hosts ... one that listens on port 80, the other that listens on port 443.

Both virtual hosts use the include directive to configure the details ...

For example, for the midrange mailing list archives this is a snippet of what's included in the 'archive.midrange.inc' file...

----------
ServerName archive.midrange.com
ServerAdmin david@xxxxxxxxxxxx
DocumentRoot /usr/local/www/midrange/archive/html
ErrorLog /usr/local/www/midrange/archive/logs/error_log
CustomLog /usr/local/www/midrange/archive/logs/access_log combined env=!loopback
AddOutputFilter DEFLATE js css php html htm
-----------

Then I have two additional files ... archive.midrange.conf and archive.midrange-le-ssl.conf

archive.midrange.conf consists of ...

----------
<VirtualHost *:80>
Include sites/archive.midrange.inc
</VirtualHost>
---------

archive.midrange-le-ssl.conf consists of ...

----------
<IfModule mod_ssl.c>
<VirtualHost *:443>
Include sites/archive.midrange.inc

RewriteEngine on
SSLCertificateFile /etc/letsencrypt/live/archive.midrange.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/archive.midrange.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
----------

This is on Linux ... but it's still Apache, so it should will work fine on IBM i.

david


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.