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
Advanced

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, Azure Admin)

View solution in original post

4 Replies
abhinavmishra14
Advanced

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, Azure Admin)
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
Advanced

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

Jump to solution

Gald to hear @fabrice7 , good luck.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
akreienbring1
Member II

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

Jump to solution

So, according to this link:

alfresco-community-repo/SysAdminParamsImpl.java at master · Alfresco/alfresco-community-repo · GitHu...

this setting in global.properties:

api.explorer.url=http://<my-server>/api-explorer

Should configure the value for apiExplorerUrl that is returned from the server.

But it doesn't. This value is not even mentioned under the JMX settings.

I'm using ACS 7.2.0.1