cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO: Change the default port from 8080

mikeh
Star Contributor
Star Contributor
- Ensure your Tomcat instance is looking on our extensions classpath. See http://wiki.alfresco.com/wiki/Install_Tomcat6 for details
- Get share-config-custom.xml.sample from SVN: http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/slingshot/config/alfr...
- Copy this file to tomcat/shared/classes/alfresco/web-extension (create the folders if they're not there) and rename it to remove the .sample extension
- Edit this file (notepad will do, or any other text editor).
- You don't need most of the other config, just the section at the bottom… something like this:
<alfresco-config>

   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>

</alfresco-config>
- Edited the sample above to change the "localhost:8080" part of the URLs to match your local setup.
- Save the new config file and restart Tomcat (or just redeploy share)

Thanks,
Mike
19 REPLIES 19

mikeh
Star Contributor
Star Contributor
What happens to the tomcat's port number in server.xml file under the conf directory, because I was thinking that, that's the port where the application is running from.
Yes, that's exactly where you change it. But these steps details how you then configure Share to tell it where the repository is; it could be on a completely different IP address and port so we can't assume anything!

Thanks,
Mike

croc
Champ in-the-making
Champ in-the-making
Thanks

samudaya
Champ on-the-rise
Champ on-the-rise
Hi,

I have done this very easy way on Linux box. Find all the "8080" strings by using grep command (eg: grep -r "8080" /opt/alfresco-4.0.d/). Then replace relevant port to port-80 by some common sense .

[
/opt/alfresco/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
/opt/alfresco/tomcat/shared/classes/alfresco-global.properties
/opt/alfresco-3.4.d/tomcat/webapps/ROOT/jsp/parts/titlebar.jsp
/opt/alfresco-3.4.d/tomcat/shared/classes/alfresco/extension/wqsapi-custom.properties
/opt/alfresco-3.4.d/tomcat/webapps/ROOT/WEB-INF/classes/alfresco/repository.properties
etc….
]


Thanks
SAMU

smcardle
Champ in-the-making
Champ in-the-making
The only file necessary to change is the share-config-custom.xml


Steve

jonvargas
Confirmed Champ
Confirmed Champ
I think you also should change some alfresco-global.properties values so that generated links in a Document's Detail page be correct.



alfresco.context=alfresco
alfresco.host=${localname}
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=${localname}
share.port=8080
share.protocol=http


This is very useful so that generated URLs could point correcly to the hostname you define. When using Alfresco behind a reverse proxy, this is also useful.

nannasin28
Champ in-the-making
Champ in-the-making
I cannot find the file share-config-custom.xml.sample

bisana
Champ on-the-rise
Champ on-the-rise
Hi
Some time you may not want to edit configuration file, In such scenario use IPTABLES
the command to be given is
 iptables -t nat -A PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080 

This is for LINUX machine, and It works fine

webberj
Champ on-the-rise
Champ on-the-rise
Hi,

As per your HOWTO above, I have the exact same configuration in my share-config-custom.xml file, but I am still having issues.

We would like to use SSL over port 8443, instead of non-SSL over port 8080, but this is proving difficult to implement.

The ONE section which breaks Alfresco Share Authentication is:

<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>

If I amend this code to point to HTTPS and port 8443 the user authentication for Alfresco Share fails.  if I put this back as above, it all works correctly!

Please can someone help me as to how I can amend this code to use SSL over port 8443 instead of non-SSL over port 8080.

Thanks
John

vikramvanama
Champ in-the-making
Champ in-the-making
hi,

Is there any solution to change the default url(http://127.0.0.1:7070/alfresco) to like (http://127.0.0.1:7070/xxx)

Thanks,
Vikram

anon26949
Star Contributor
Star Contributor

What helped:

grep -R "port number here" --include="*.xml" "pattern" /opt/alfresco-community/

8080 -> 9191

/opt/alfresco-community/tomcat/webapps/alfresco/META-INF/maven/org.alfresco/alfresco-platform/pom.xml: <solr.port>8080</solr.port>
/opt/alfresco-community/tomcat/webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml: <repository-url>http://localhost:8080/alfresco</repository-url>
/opt/alfresco-community/tomcat/webapps/share/WEB-INF/classes/alfresco/share-cmis-config.xml: <parameter key="org.apache.chemistry.opencmis.binding.atompub.url" value="http://localhost:8080/alfresco/cmisatom"/>
/opt/alfresco-community/tomcat/conf/server.xml: Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
/opt/alfresco-community/tomcat/conf/server.xml: <Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1"
/opt/alfresco-community/tomcat/conf/server.xml: port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1"
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: http://localhost:8080/alfresco/s/enterprise/admin/admin-repositoryinfo
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <repository-url>http://localhost:8080/alfresco</repository-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <activiti-admin-url>http://localhost:8080/alfresco/activiti-admin</activiti-admin-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: NOTE: If alfresco server location is not localhost:8080 then also combine changes from the
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml: <endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>

+ alfresco-global.properties

8005 -> 8006

/opt/alfresco-community/tomcat/conf/server.xml:<Server port="8005" shutdown="SHUTDOWN">

8009 -> 8010

/opt/alfresco-community/tomcat/conf/server.xml: <!-- Define an AJP 1.3 Connector on port 8009 -->
/opt/alfresco-community/tomcat/conf/server.xml: <Connector port="8009" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8443" />

8443 -> 8444

/opt/alfresco-community/tomcat/conf/server.xml: redirectPort="8443" maxHttpHeaderSize="32768" />
/opt/alfresco-community/tomcat/conf/server.xml: redirectPort="8443" maxHttpHeaderSize="32768" />
/opt/alfresco-community/tomcat/conf/server.xml: <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
/opt/alfresco-community/tomcat/conf/server.xml: <Connector port="8443" URIEncoding="UTF-8" protocol="HTTP/1.1"
/opt/alfresco-community/tomcat/conf/server.xml: <Connector port="8010" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8443" />
/opt/alfresco-community/tomcat/conf/server.xml: <Connector port="8443" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"

+ alfresco-global.properties

Kind regards,

Aleksey Bykov

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.