There are some times when you need to access your Alfresco server behind a firewall (to get access to it from outside your company) or you just want to use a more clean URL, that is:
This can be achieved with a Reverse Proxy server or adding some rewriting rules in Apache (using hte mod_rewrite module), but this is a topic for another post.
The fact is that in spite of we are able to access Alfresco through the Web interface, we cannot connect using the iPhone/iPAD app getting this error:
Alfresco Mobile did not connect to http://myalfrescoserver:8080/alfresco/service/cmis/s/workspace/....
The problem is that the iphone app gets the internal url from the webservice. Should we try the url from internal network we’ll be able to 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.
These are the steps to fix it:
- Create the directory META-INF :
- Create the file spring-webscripts-config-custom.xml in the folder
- Add the following code:
<alfresco-config> <config evaluator="string-compare" condition="Server"> <server> <scheme>http</scheme> <hostname>your-pulic-host</hostname> <port>your-port</port> <path>alfresco</path> </server> </config> </alfresco-config>
- Restart Alfresco
Now try the iPhone/iPAD app!