Run Alfresco on a non-standard port

Posted on Tuesday, February 12, 2013



I recently had a need to run alfresco on a non-standard port.  There are a few gotchas to this so I thought I would document them to help out the next guy who has to deal with it.

The installation of Alfresco 4.2 I will be tweaking with is running on Tomcat 7.0.34 and has Alfresco Share running alongside it on the same server.

My tomcat folder is at /opt/tomcat

I am going to use port 9090 rather than the typical 8080





Tomcat Fixes


First let's tackle fixing tomcats default settings


Open up /opt/tomcat/conf/server.xml


 >  sudo vi +70 /opt/tomcat/conf/server.xml


Change the port to 9090




Restart tomcat



 >  sudo /etc/init.d/tomcat restart





Open up your server address with the new 9090 port number to make sure it is working, in my case it is http://192.168.0.111:9090/


But Alas, now Alfresco and Alfresco Share are not working correctly so let's correct them.


Fix the .properties files


There are two .properties files you need to fix.  The first one that needs to be fixed is the /opt/tomcat/shared/classes/alfresco-global.properties


Open it up


 >  sudo vi /opt/tomcat/shared/classes/alfresco-global.properties




Search for alfresco.port and share.port and upate their values to 9090
Then save the file.


The next file you need to edit is

/opt/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml

There is a chance it does not exists but its .sample version does.  So if you do not have this file copy the .sample version to it first.  Run these commands


>  cd /opt/tomcat/shared/classes/alfresco/web-extension/
>  sudo cp share-config-custom.xml.sample share-config-custom.xml


Now open and edit it



>  sudo vi share-config-custom.xml


Replace all occurances of 8080 with 9090

In vi you can run this command


:%s/8080/9090/g


Save the file


Now reboot the computer


>  sudo reboot now



Now open up alfresco share, in my case its located at http://192.168.0.111:9090/share





Now you should have Alfresco Share running on a non-standard port in Tomcat 7 just fine.






References

No comments:

Post a Comment