cancel
Showing results for 
Search instead for 
Did you mean: 

Create multiple sites with different URLs

numan85
Champ in-the-making
Champ in-the-making
Hello,

I saw a couple similar posts but none of them seemed to fit my exact question. I was wondering how to use web quick start in alfresco share to create multiple quick starts sites with different URL paths.

Right now the only site i created is http://Server:8080/wcmqs. Is it possible for different departments to create different sites for example:

http://Server:8080/Finance
http://Server:8080/Innovation

and have them all on the same server?

Thank you!
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
You have a few options available to achieve this kind of thing. First, a quick recap of how the WQS webapp resolves a URL to an asset:

Given a requested URL "http://my.example.com:80/wcmqs/news/global/article1" that has been routed to our webapp, first we find the corresponding website in the repository. The website is represented by a node of type ws:website in the repository, and the standard WQS installation has two of these by default: "Quick Start Editorial" and "Quick Start Live". These nodes have a few special properties including host name, port number, and web context. With our example URL, assuming that the webapp itself is located at "/wcmqs", we try to find a website node with a host name of "my.example.com", a port number of 80, and a web context of "/wcmqs".

If we manage to find such a website node in the repository, then we use the rest of the URL ("/news/global/article1") to find the asset. This corresponds to the path "root/news/global/article1" below the website node that was found in the repository.

So, therefore, you can have as many websites held in the repository as you wish. The only caveat is that the combination of host name, port, and web context must be unique across all of them. If you want to share all the page templates and webapp logic across your sites, then I would suggest that you use different host names to distinguish between them. For example:

   http://finance.example.com/wcmqs/path/in/the/finance/site
   http://innovation.example.com/wcmqs/path/in/the/innovation/site
With the example above, the same webapp will be used, but different website data will be selected from the repository to be rendered. You will need to ensure that DNS resolves both host names to the same IP. A CNAME record with a wild card will provide that. In the repository you will have two website nodes:

Finance Website
   host name = "finance.example.com"
   port number = 80
   web context = "/wcmqs"

Innovation Website
   host name = "innovation.example.com"
   port number = 80
   web context = "/wcmqs"

If, however, you want different webapps to render your different websites then use the web context to distinguish between them:

   http://www.example.com/finance/path/in/the/finance/site
   http://www.example.com/innovation/path/in/the/innovation/site
In this case, you deploy two webapps in your web container (such as Tomcat) named "finance.war" and "innovation.war". In the repository your two website nodes look a little different:


Finance Website
   host name = "www.example.com"
   port number = 80
   web context = "/finance"

Innovation Website
   host name = "www.example.com"
   port number = 80
   web context = "/innovation"

Finally, if neither of those options work, you can use the port number to distinguish between the sites. This is unlikely to be particularly useful except for, perhaps, distinguishing between editorial and live versions of a site. Naturally you can mix and match these techniques in a single repository if you wish, distinguishing some websites by host name, others by web context, and yet more by port number.

Does that help?

pchoe
Champ in-the-making
Champ in-the-making
what exactly would be in the finance.war/innovation.war files?

would these war file be created from the share library, if so, how is the war file created through alfresco?  or is it a manual process and i would need to find all the necessary files myself and war it up?

bremmington
Champ on-the-rise
Champ on-the-rise
In the simplest case you would just create two copies of the supplied example war file "wcmqs.war".