Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

When a tenant hosts an application to be used by external parties, it should ideally have a short URL. Shorter URLs are easier to be memorized and typed, which eliminates the need to log-in to access the application. Also, tenant information and other descriptive attributes are hidden in shorter URLs, and they are more convenient in hard-copy productions.

...

In Application Server, the web application of admin is accessible through http://localhost:port/webappname and web application of tenant is accessible through http://localhost:port/webapps/t/tenant_domain/webappnameInstead of going through this long URL process, the URL Mapping feature provides a way to access your hosted web application with a shorter URL like https://appid.localhost:port in standalone products. If your Application Server is fronted with a load balacher, then depending on the port of the load balancher, https://appid.localhost can be used. For example, if the actual URL of an application is http://appserver.stratoslive.wso2.comlocalhost:port/t/tenant.com/webapps/example, after URL mapping, you get a shorter URL as http://exampleapp.wso2.com. If localhost where the appID is 'exampleapp, then ' and the custom mapping will be 'exampleapp.wso2.com' where the suffix 'wso2.com' can be changed according to your preference by editing the file, <PRODUCT_HOME>/repository/conf/etc/url-mappings.xml.

The URL mapping functionality is bundled by default in the WSO2 Application Server. If it is not included in the WSO2 product you are using, you can install it using the instructions provided in section Feature Management. Once installed, the necessary menus will appear in the product's management console.

...

6. The added URL mapping appears in the "URL Mapping" window. From there, you can edit or delete the mapping.

Image RemovedImage Added

  • Here the suffix "localhost" comes from CARBON_HOME/repository/conf/etc/url-mapping-config.xml. You can configure your own suffix and 'URL mappings limit' per web application in the mentioned configuration file. By default, the suffix is "localhost" and 'URL mappings limit' is one.

7. Once the URL mapping is created, your domain is "exampleapp.wso2.com". Whether you are a tenant or not, you can access this Web application by entering the URL "https://exampleapp.wso2.com:port" as shown below:

Also, to To access your own domain, a cname is required. If a cname is not available at the moment, you can use /etc/hosts file in ubuntu and  or Windows\System32\drivers\etc\hosts file in windows to put your domain entries pointing to the local ip.

For example,

Code Block
127.0.0.1       exampleapp.localhost

This is applicable only for testing purposes. 

Excerpt
hiddentrue

Description of URL mapping for applications.