cancel
Showing results for 
Search instead for 
Did you mean: 

Change external alfresco url (/service/cmis) for iphone ap

goebel
Champ on-the-rise
Champ on-the-rise
Hi

We have a testing alfresco server (4.0c) which is behind a firewall an we want to open it for external use. We did some apache rewrite rules and the web interface for alfresco and share is available from internet. So everything works correctly for alfresco and share.

The server is available through internal url : http://myalfresco:8080/alfresco
The server is available through external url : http://www.mycompany.com/alfresco

But when we try the iphone/ipad application, we are able to connect and see the sites. But when we try to enter a site we get an error in the ios app "Alfresco Mobile did not connect to http://myalfresco:8080/alfresco/service/cmis/s/workspace/…..
The problem is that the iphone app gets the internal url from the webservice. When I try the url from internal network I am able o download the xml data which is send from the server to the client. In this xml data, all the href point to http://myalfresco:8080/alfresco instead of http://www.mycompany.com/alfresco

I checked the forums and tried a lot of modifications in alfresco-global.properties but whithout success 😞
For instance, I tried to change these parameters

repo.remote.url=http://www.mycompany.com/alfresco
url.serviceContext=http://www.mycompany.com/alfresco
url.serverPath=http://www.mycompany.com/alfresco

Every time I tried the cmis services, I always get the internal hostname

Does anybody have a hint how to fix it ?

Thanks a lot

Georges Goebel
15 REPLIES 15

xarope
Champ in-the-making
Champ in-the-making
Unfortunately I seem to have also bumped into the same problem. 

I'm using nginx to provide reverse proxy, and access on both http and https works for web and android (using JM Pascal's ALF-ACC Mobile lite, and Zia's Freshdocs for testing).  But on ipad (and other iphones), with Alfresco Mobile, and Zia's Freshdocs, this only works on the http interface, and fails on the https interface with the error messages:

"Alfresco Mobile did not connect to https://externalhostname:443/alfresco/service/cmis

The URL is correct, since when I just swipe off https, I can connect again via http.

My steps are:

1. mkdir /opt/alfresco/tomcat/shared/classes/META-INF

2. vi /opt/alfresco/tomcat/shared/classes/META-INF/spring-webscripts-config-custom.xml
<alfresco-config>
      <config evaluator="string-compare" condition="Server">
      <server>
         <scheme>https</scheme>
         <hostname>externalhostname.com</hostname>
         <port>443</port>
         <path>alfresco</path>
      </server>
   </config>
</alfresco-config>

3. check that /opt/alfresco/tomcat/conf/catalina.properties has:
"shared.loader=${catalina.base}/shared/classes"
In fact, my installation already has
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

4. restart alfresco

On the ipad, I can use Safari to connect to the URL https://externalhostname:443/alfresco/service/cmis, and after a login, get the cmis output, which shows my URLs are of the correct form,e.g.

<collection href="https://externalhostname.com:443/alfresco/service/cmis/s/workspace:SpacesStore/i/05754434-33cb-410b-...">

Prior to doing the 4 steps above, the URLs were just "http://127.0.0.1:8080" so obviously this change is working.

Any thoughts as to why this isn't working?  Bearing in mind that on the Android platform, all the apps I've tried so far appear to be working, so is this an issue specific to the iOS (Apple, no Cisco) platform?

xarope
Champ in-the-making
Champ in-the-making
anybody else encountered this same problem with access via apple products and SSL proxy?  As I mentioned, it seems to work on the android devices and apps I've tried (as well as normal web access), just not on any ipad/iphone apps.

xarope
Champ in-the-making
Champ in-the-making
anybody?  I'm desperate enough to do some packet capture and try to figure out what is going on (I can feel my eyes watering already!)

umamaheswari
Champ in-the-making
Champ in-the-making
Hey hi !!!

I am facing the same issue.. Were you able to resolve that in any means?? can u pls help with this ??

umamaheswari
Champ in-the-making
Champ in-the-making
Hey everyone,
I am also facing the same issue while accessing the URL from an iPad app but in a Multi-tenant environment with SSL enabled.
I was able to solve this issue when MT was not enabled.
But the same issue started occuring after enabling Multi-tenancy.
THis totally works fine in Android devices but not in iPad. The META-INF folder creation has no effect in MT and SSL enabled server. Could somebody pls help on this ????

Thanks !!!!!

joe_l3
Confirmed Champ
Confirmed Champ
Hi all,

in my environment, the changes have effects only with the old (alfresco 3.x) CMIS AtomPub binding "alfresco/service/cmis":

https://your.dns.com/alfresco/service/cmis

If I configure my Android device with the new CMIS endpoind Urls, it doesn't work.
You can check the correct server hostname by opening the available CMIS Urls in your browser:

For Alfresco 3.x : https://your.dns.com/alfresco/service/cmis
For Alfresco 4.0.x and Alfresco 4.1.x : https://your.dns.com/alfresco/cmisatom
For Alfresco 4.2 and Alfresco 5.0: https://your.dns.com/alfresco/api/-default-/public/cmis/versions/1.0/atom

My App Stack
- HTTPS access through Apache Server 2.0 with http proxy/reverse
- Alfresco Community 4.2.e
- Android 5.1.1