Deploy with a Different Context Path - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

There are a number of updates that you need to make if you want to deploy to a context path that isn’t /alfresco.

The context path is the path that’s used by applications (for example, Alfresco Share, SOLR, SharePoint, and others) to access the repository. If you change this value, you must reflect the change in your application server configuration.

Note: You can’t install at the server root (i.e. /). In other words, the context path can’t be the server root.

Follow these steps if you want to deploy to a context path that’s not /alfresco. The string new-context-path is used to represent the name of the context path that you’re using:

  1. Deploy the alfresco.war file to a different context path; for example, if you’re using Tomcat, rename the alfresco.war file to new-context-path.war and then deploy it. For other application servers, set the context path in the Admin Console during deployment.
  2. Update alfresco-global.properties with the name of the context path: alfresco.context=new-context-path.
  3. Update share-config-custom.xml as described in Setting Default Port.
  4. Update the context path setting in the _vti_bin application:
    1. Unpack the _vti_bin.war file.
    2. Locate the WEB-INF/web.xml file in the _vti_bin application.
    3. Replace the <param-value> value with /new-context-path/aos to update the context parameter with the new context path. The example shows the default values in the WEB-INF/web.xml file:
       <context-param>
          <param-name>org.alfresco.enterprise.repo.officeservices.dispatch.SERVICES</param-name>
          <param-value>/alfresco/aos</param-value>
          <description>A space separated list of url-encoded context paths of SharePoint protocol enabled applications (e.g. Alfresco Content Services)</description>
       </context-param>
    4. Repack the contents of the _vti_bin application into a _vti_bin.war file and deploy it.
  5. Unpack ROOT.war and edit the index.jsp file to set the context path:

    Change /alfresco to /new-context-path:

    if(request.getMethod().equals("PROPFIND") || request.getMethod().equals("OPTIONS"))
     { ServletContext alfrescoContext = application.getContext("/alfresco"); ... }
    							
  6. Repack the contents of ROOT.war and deploy it.
  7. Update the Solr configuration to specify the new context path:

    If you’re using Solr, modify the following files:

     solr/workspace-SpacesStore/conf/solrcore.properties
     solr/archive-SpacesStore/conf/solrcore.properties
    

    to specify the properties relevant to your configuration:

     alfresco.host=localhost
     alfresco.port=8080
     alfresco.port.ssl=8443
     alfresco.baseUrl=/alfresco