Skip to content

Instantly share code, notes, and snippets.

@phpdave
Last active April 19, 2018 13:22
Show Gist options
  • Select an option

  • Save phpdave/9f31bebfe54bf065cad24b57f3444ea3 to your computer and use it in GitHub Desktop.

Select an option

Save phpdave/9f31bebfe54bf065cad24b57f3444ea3 to your computer and use it in GitHub Desktop.

Revisions

  1. phpdave revised this gist Apr 19, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions httpd.conf
    Original file line number Diff line number Diff line change
    @@ -39,3 +39,5 @@ NameVirtualHost 10.1.1.200:443
    #::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
  2. phpdave revised this gist Apr 19, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion httpd.conf
    Original file line number Diff line number Diff line change
    @@ -34,4 +34,8 @@ NameVirtualHost 10.1.1.200:443
    SSLCacheEnable
    SetEnv HTTPS_PORT 443
    Options FollowSymLinks
    </VirtualHost>
    </VirtualHost>

    #::SSLServerCert directive::
    #Description: Sets the server certificate to use for this virtual host
    #Scope: IP-based virtual hosts
  3. phpdave revised this gist Nov 3, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions httpd.conf
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@ NameVirtualHost 10.1.1.200:443
    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
    @@ -29,6 +30,7 @@ NameVirtualHost 10.1.1.200:443
    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
  4. phpdave revised this gist Aug 15, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions httpd.conf
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,7 @@ NameVirtualHost 10.1.1.200:443
    SSLEngine On
    SSLAppName QIBM_HTTP_SERVER_ZENDSVR_MYApp1
    SSLCacheEnable
    SetEnv HTTPS_PORT 443
    Options FollowSymLinks
    </VirtualHost>

    @@ -29,5 +30,6 @@ NameVirtualHost 10.1.1.200:443
    SSLEngine On
    SSLAppName QIBM_HTTP_SERVER_ZENDSVR_MYApp2
    SSLCacheEnable
    SetEnv HTTPS_PORT 443
    Options FollowSymLinks
    </VirtualHost>
  5. phpdave renamed this gist Aug 14, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. phpdave created this gist Aug 14, 2017.
    33 changes: 33 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    # 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
    SSLCacheEnable
    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
    SSLCacheEnable
    Options FollowSymLinks
    </VirtualHost>