What exactly is `-Dshare.host=XYZ` doing to Repository?

cancel
Showing results for 
Search instead for 
Did you mean: 
fabrice7
Partner

What exactly is `-Dshare.host=XYZ` doing to Repository?

Jump to solution

Hello,

I am using Alfresco CE 6.2. 

I would like to fully understand what those settings are doing to Repository: -Dshare.host=XYZ and -Dalfresco.host=XYZ

Some question for Share.

The reason for asking this question is the following. I use NGINX as a proxy for both Repository and Share. So the domain name to access Repository or Share from outside is whatever DNS is pointing to NGINX (which uses HTTPS with a self-signed certificate). But I want Repository and Share to talk to each other directly (please note they don't run on the same machine, and they should talk to each other using HTTP, not HTTPS).

Thanks for any help!

1 Solution

Accepted Solutions
abhinavmishra14
Moderator
Moderator

Re: What exactly is `-Dshare.host=XYZ` doing to Repository?

Jump to solution

So these properties that you keep in alfresco-global.properties are same as these :

https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfres...

alfresco.context=alfresco
alfresco.host=${localname}
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=${localname}
share.port=8080
share.protocol=http

You override the above properties in alfresco-global.properties depending on the type of setup. These properties are useful for generating the user accessible urls. e.g. Url to a node that get accessed either on alfresco host or share host.

You use this utility to generate alfresco or share urls. : https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresc...

it intern uses sysAdminParams implementation: https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresc...

Please review above classes carefully, you can also try using the utility in a java backed webscript to see how they work. Alfresco itself uses these utilities internally for several cases. so make sure you keep these properties intact and do not remove else it will try to take defaults.

Now when it comes to communication from share to alfresco, it is not dependent on alfresco-global.properties rather, it uses config based in share-config-custom.xml: https://github.com/Alfresco/share/blob/develop/packaging/distribution/src/main/resources/web-extensi...

When you have acs on different host, you update the above config to point to acs host, it could definetly be configured to use either http, https, proxy etc. Its up to you. so to be clear share to alfresco communitucation is not dependent on share.host, share.port or alfresco.host, alfresco.port. 

Hope it helps.

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

3 Replies
abhinavmishra14
Moderator
Moderator

Re: What exactly is `-Dshare.host=XYZ` doing to Repository?

Jump to solution

So these properties that you keep in alfresco-global.properties are same as these :

https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfres...

alfresco.context=alfresco
alfresco.host=${localname}
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=${localname}
share.port=8080
share.protocol=http

You override the above properties in alfresco-global.properties depending on the type of setup. These properties are useful for generating the user accessible urls. e.g. Url to a node that get accessed either on alfresco host or share host.

You use this utility to generate alfresco or share urls. : https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresc...

it intern uses sysAdminParams implementation: https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresc...

Please review above classes carefully, you can also try using the utility in a java backed webscript to see how they work. Alfresco itself uses these utilities internally for several cases. so make sure you keep these properties intact and do not remove else it will try to take defaults.

Now when it comes to communication from share to alfresco, it is not dependent on alfresco-global.properties rather, it uses config based in share-config-custom.xml: https://github.com/Alfresco/share/blob/develop/packaging/distribution/src/main/resources/web-extensi...

When you have acs on different host, you update the above config to point to acs host, it could definetly be configured to use either http, https, proxy etc. Its up to you. so to be clear share to alfresco communitucation is not dependent on share.host, share.port or alfresco.host, alfresco.port. 

Hope it helps.

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

fabrice7
Partner

Re: What exactly is `-Dshare.host=XYZ` doing to Repository?

Jump to solution

Hi @abhinavmishra14 ,

Yes, that's very helpful, thanks. 

I managed to work out what I need to do, thanks!

abhinavmishra14
Moderator
Moderator

Re: What exactly is `-Dshare.host=XYZ` doing to Repository?

Jump to solution

Gald to hear @fabrice7 , good luck.

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)