Skip to content

Instantly share code, notes, and snippets.

@phpdave
Last active April 19, 2018 13:22
Show Gist options
  • Save phpdave/9f31bebfe54bf065cad24b57f3444ea3 to your computer and use it in GitHub Desktop.
Save phpdave/9f31bebfe54bf065cad24b57f3444ea3 to your computer and use it in GitHub Desktop.
IBM i apache config for Zend Server https/ssl
# Load the SSL module into Apache
LoadModule ibm_ssl_module /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM
# Listen for HTTPS traffic
Listen 10.1.1.200:80
Listen 10.1.1.200:443
NameVirtualHost 10.1.1.200:443
# MYApp - Redirect to HTTPS
<VirtualHost 10.1.1.201:80>
RewriteEngine On
RewriteRule ^/(.*)? https://%{HTTP_HOST}/$1
</VirtualHost&amp;amp;gt;</pre>
# MYApp1 (HTTPS)
<VirtualHost 10.1.1.200:443>
ServerName myapp1.example.com
DocumentRoot /www/zendsvr/htdocs/
SSLEngine On
SSLAppName QIBM_HTTP_SERVER_ZENDSVR_MYApp1
SSLServerCert QIBM_HTTP_SERVER_MYApp1_CERT
SSLCacheEnable
SetEnv HTTPS_PORT 443
Options FollowSymLinks
</VirtualHost>
# MYApp2 (HTTPS) with a different certificate and domain
<VirtualHost 10.1.1.200:443>
ServerName myapp2.example.com
DocumentRoot /www/zendsvr/htdocs/
SSLEngine On
SSLAppName QIBM_HTTP_SERVER_ZENDSVR_MYApp2
SSLServerCert QIBM_HTTP_SERVER_MYApp2_CERT
SSLCacheEnable
SetEnv HTTPS_PORT 443
Options FollowSymLinks
</VirtualHost>
#::SSLServerCert directive::
#Description: Sets the server certificate to use for this virtual host
#Scope: IP-based virtual hosts
#Same appname can be used if Multi-Domain (SAN) Certificate, just need a SAN for each domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment