Close this search box.

Change Alfresco Default Port 8080

8080 is the most popular port for Java based web applications running on Tomcat server and hence it is a target of attacks from hackers and spammers. If you are testing your application and don’t want to overload the server with these hacking attempts you can always change the default port of Alfresco to something different. In the following instructions we are going to use port 1234.

The following guide has been tested to work on Alfresco Community Edition version 3.4.d

You need to do it in two parts; change the default tomcat port and then change the alfresco share ports etc. <Alfresco Home> is the location of the folder where alfresco is installed. In case of Ubuntu Linux it is usually /opt/alfresco-3.4.d

Change Tomcat Port:

Open <Alfresco Root>/tomcat/conf/server.xml and change line 69 from
{code codetype=xml}<Connector port=”8080″ URIEncoding=”UTF-8″ protocol=”HTTP/1.1″
redirectPort=”8443″ />{/code}
{code codetype=xml}<Connector port=”1234″ URIEncoding=”UTF-8″ protocol=”HTTP/1.1″
redirectPort=”8443″ />{/code}

The above will change the default port of tomcat from 8080 to 1234.

Now edit the file <Alfresco Home>/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml and replace all the mentions of port 8080 to 1234. Specifically there are three endpoints defined in this file with the element name endpoint-url e.g.

{code codetype=xml}<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>{/code}

You will find three entries same as above at lines 18, 27 and 36. Once you have changed the port number from 8080 to 1234. Restart Alfresco and now your alfresco installation is available at port 1234. You can login using http://localhost:1234/alfresco/ or http://localhost:1234/share/ on the same machine where alfresco is installed or using http://<IP Address>:1234/alfresco/ or http://<IP Address>:1234/share/ on another computer.

Share on:

You may also like