This document explains how to set and change SSL/TLS certificate. 

How to change the certificate


  1. Stop MagicInfo-i Premium Edition Server Service. 

    1. Run execute window pressing Windows Key + R 

    2. Enter services.msc 

    3. FInd MagicInfo-i Premium Edition Server Service and Stop the service. 

  2. Edit server.xml 

    1. Open server.xml using text editor. Ex) C:\MagicInfo Premium\tomcat\conf\server.xml

      C:\MagicInfo Premium\tomcat\conf\server.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <Server port="7005" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
      <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
      <GlobalNamingResources>
      <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/>
      </GlobalNamingResources>
      <Service name="Catalina">
      <Connector port="7001" protocol="org.apache.coyote.http11.Http11Nio2Protocol" maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" URIEncoding="UTF-8" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml" server="MagicInfo Premium Server" maxPostSize="8388608" />
      <Connector port="7002" protocol="org.apache.coyote.http11.Http11Nio2Protocol" maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" keystoreFile="C:/MagicInfo Premium/runtime/keystore/MagicInfoIdentity.jks" keystorePass="MagicInfoIdentityKeyStorePassPhrase" keystoreType="JKS" URIEncoding="UTF-8" sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,SSLv2Hello" maxPostSize="8388608" />
      <Connector port="7009" protocol="AJP/1.3" redirectPort="[**]"/>
      <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      <Realm className="org.apache.catalina.realm.LockOutRealm"/>
      <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
      <Valve className = "org.apache.catalina.valves.ErrorReportValve" showReport = "false" showServerInfo = "false" />
      <Context path="/MagicInfo" docBase="C:/MagicInfo Premium/server" privileged="true" antiResourceLocking="false" antiJARLocking="false">
      <Manager pathname=""/>
      </Context>
      <Context path="/MagicInfoWebAuthorClient" docBase="C:/MagicInfo Premium/webauthor/MagicInfoWebAuthorClient.war"/>
      <Context path="/MagicInfoLayoutEditor" docBase="C:/MagicInfo Premium/webauthor/MagicInfoLayoutEditor.war"/>
      <Context path="/RMServer" docBase="C:/MagicInfo Premium/rmserver/server" privileged="true" antiResourceLocking="false" antiJARLocking="false">
      <Manager pathname=""/>
      </Context>
      </Host>
      </Engine>
      </Service>
      </Server>
    2. Find certificate section and update keystoreFile,  keystorePass and save it.

      server.xml
      <Connector port="7002"
      protocol="org.apache.coyote.http11.Http11Nio2Protocol"
      maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true"
      keystoreFile="C:/MagicInfo Premium/runtime/keystore/MagicInfoIdentity.jks" keystorePass="MagicInfoIdentityKeyStorePassPhrase"
      keystoreType="JKS"
      URIEncoding="UTF-8" sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,SSLv2Hello" maxPostSize="8388608" />
    3. Restart MagicInfo-i Premium Edition Server service.

    4. Access using 7002 port. https://localhost:7002/MagicInfo/ 


  1. The type of certificate should be jks (java keystore).
  2. If you try to access the port 7002 (https://localhost:7002/MagicInfo/) without changing the certificate, a security warning will appear. This is normal.
  3. If you have changed the port at the time of installation or want to use a different port, you need to change 7001, 7002.


How to enable SSL mode after installation with HTTP Only


  1. Stop the MagicInfo-i Premium Edition Server service.

    1. Press Windows Key + R to open the Run window.
    2. Enter services.msc
    3. Find MagicInfo-i Premium Edition Server and stop the service. 


  2.  Edit server.xml 

    1. Open server.xml using text editor. ex) C:\MagicInfo Premium\tomcat\conf\server.xml

    2. Add 7002 port settings below the 7001 port setting section.

      server.xml
      <Connector port="7001" protocol="org.apache.coyote.http11.Http11Nio2Protocol" maxHttpHeaderSize="8192"
              maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" URIEncoding="UTF-8"
              compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" 
              compressableMimeType="text/html,text/xml" server="MagicInfo Premium Server" maxPostSize="8388608" />
      
      
      <Connector port="7002" 
              protocol="org.apache.coyote.http11.Http11Nio2Protocol" 
              maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" 
              keystoreFile="C:/MagicInfo Premium/runtime/keystore/MagicInfoIdentity.jks" keystorePass="MagicInfoIdentityKeyStorePassPhrase" 
              keystoreType="JKS" 
              URIEncoding="UTF-8" sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,SSLv2Hello" maxPostSize="8388608" />
    3. Restart MagicInfo-i Premium Edition Server Service. 

    4. Access this url. https://localhost:7002/MagicInfo/ 


How to activate SSL only mode


  1. Stop the MagicInfo-i Premium Edition Server service.

    1. Press Windows Key + R to open the Run window.
    2. Enter services.msc
    3. Find MagicInfo-i Premium Edition Server and stop the service. 


  2.  Edit server.xml 
     
    1. Open server.xml using text editor. ex) C:\MagicInfo Premium\tomcat\conf\server.xml

    2. Delete 7001 port setting section. 
    3. Add 7002 port setting if it is not present already. 

      server.xml
       <Connector port="7002" 
              protocol="org.apache.coyote.http11.Http11Nio2Protocol" 
              maxHttpHeaderSize="8192" maxThreads="150" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" 
              keystoreFile="C:/MagicInfo Premium/runtime/keystore/MagicInfoIdentity.jks" keystorePass="MagicInfoIdentityKeyStorePassPhrase" 
              keystoreType="JKS" 
              URIEncoding="UTF-8" sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,SSLv2Hello" maxPostSize="8388608" />