cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO: Reconfigure for a port other than 8080

rafo
Champ in-the-making
Champ in-the-making
I need to run Alfresco on a server where port 8080 is already being used by another service. I looked around in the Installation Guide, the System Administration Guide, the wiki and the forum, but I didn't find any detailed description of how to do this. So, I will put my findings into this thread to start with; please make comments and additions as needed (for example, the JBoss case will look different?). Eventually this kind of info should go into the Guides, IMHO.

My environment: Linux, 2.6 kernel, Alfresco 1.4.0 running on Tomcat only. $ALF_HOME denotes the directory where the Alfresco control scripts reside.

To change the configured 8080 port, do the following:

1. Stop Alfresco:

cd $ALF_HOME
./alf_stop.sh
pgrep java
The `pgrep java' command should not report any java process related to Alfresco Tomcat; if it does then kill it manually.

2. Edit the port setting in $ALF_HOME/tomcat/conf/server.xml and $ALF_HOME/tomcat/shared/classes/alfresco/extension/file-servers-custom.xml. The port value occurs twice in file-servers-custom.xml.

3. Edit the alfresco.war:

cd $ALF_HOME/tomcat/webapps
rm -rf alfresco
mkdir zap
cd zap
export PATH=../../../java/bin:$PATH
jar xf ../alfresco.war
[ edit the port settings in WEB-INF/classes/alfresco/file-servers.xml and WEB-INF/classes/alfresco/extension/file-servers-custom.xml ]
jar cf ../alfresco.war *
cd ..
rm -r zap
4. Start Alfresco:

cd $ALF_HOME
./alf_start.sh
3 REPLIES 3

peterh
Champ in-the-making
Champ in-the-making
How can I make this change in a Windows environment?  Server 2003 R2 Enterprise?

rafo
Champ in-the-making
Champ in-the-making
If Tomcat on Windows is largely the same as Tomcat on Linux the procedure ought to be quite similar. You could even install Cygwin (http://www.cygwin.com/) if you want to do step 3 in Unix-like style. But I am really just guessing, I don't have access to a Windows installation of Alfresco with Tomcat.

alexgrimmy
Champ in-the-making
Champ in-the-making
If you did the default installation of Alfresco 1.4, you will find the server.xml file here

C:\Program Files\Alfresco ECMS Community Network\tomcat\conf\server.xml

Open the file using your favorite Notepad program.

You can do a simple search for "8080", which should end up at the section

    
    <!– Define a non-SSL HTTP/1.1 Connector on port 8080 –>
    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

Just change that 8080 to 80 and you're set

    
    <!– Define a non-SSL HTTP/1.1 Connector on port 8080 –>
    <Connector port="80" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

Stop Alfresco.  Start Alfresco.  Point your browser to the server.