resolving to port 80 instead of 8080 

To cover general questions about Alfresco - other forums cover more specific Alfresco topics

resolving to port 80 instead of 8080

Postby mholmes » 05 Sep 2008, 21:10

is there a reason that alfresco was ported to port 8080 instead of port 80? Here I'd really like to just set it up to as port 80 and have it server.domain and have it resolve to the right address, instead of http://server.domain:8080/alfresco
mholmes
 
Posts: 4
Joined: 04 Sep 2008, 21:15
Alfresco Version: 3.0

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby belmekki » 05 Sep 2008, 22:15

mholmes wrote:is there a reason that alfresco was ported to port 8080 instead of port 80? Here I'd really like to just set it up to as port 80 and have it server.domain and have it resolve to the right address, instead of http://server.domain:8080/alfresco

Hello ,
Alfresco is not ported to port 8080 , this is the tomcat default port !
You can change it if you want to 80 from the $alfresco_home\tomcat\conf\server.xml . Change the port 8080 to 80 in this file and restart your server.Changes will take effect.
Hope that helps you.
Best Rgds

Open Source SI
http://www.obelsi.com
User avatar
belmekki
Community Guru
Community Guru
 
Posts: 286
Joined: 29 Aug 2008, 13:41
Location: North Africa - MOROCCO -
Alfresco Version: 3.1

31 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby mholmes » 08 Sep 2008, 21:38

I tried that, and I still was able to get the "IT WORKS" from apache, but absolutely nothing from alfresco anywhere, so I moved it back for now.

Mike
mholmes
 
Posts: 4
Joined: 04 Sep 2008, 21:15
Alfresco Version: 3.0

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby belmekki » 08 Sep 2008, 23:17

Hello Mike,
Please post us soon your alfresco log file : $Alfresco_Home\alfresco.log or \tomcat\logs\catalina.out .
I will do my possible to help you to solve this problem.
Rgds

Open Source SI
http://www.obelsi.com
User avatar
belmekki
Community Guru
Community Guru
 
Posts: 286
Joined: 29 Aug 2008, 13:41
Location: North Africa - MOROCCO -
Alfresco Version: 3.1

31 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby mautidavis » 03 Jul 2009, 09:01

Dear all,

I have the same problem. Any help on this is greatly appreciated.

Regards,
Davis M Onsakia
mautidavis
Community Member
Community Member
 
Posts: 20
Joined: 31 Mar 2009, 15:11
Alfresco Version: 3.0

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby gronfelt » 03 Jul 2009, 20:02

You could change the port number in server.xml, however, this means that you also have to change a lot of Alfresco config files and of course you cannot run anything else on port 80 at the same time.

A far better solution, in my opinion, is to use Apache along with mod_jk as a proxy.
Opportunity is missed by most people because it is dressed in overalls and looks like work. -- Thomas A Edison
Feel free to rate this post as useful if it was of any help to you.
User avatar
gronfelt
Community Guru
Community Guru
 
Posts: 272
Joined: 20 Apr 2009, 20:05
Location: Sweden
Alfresco Version: 3.2

25 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby mautidavis » 14 Aug 2009, 14:34

Please can you supply for information on this. I have not yet sorted out this issue.

Find below a portion of my catalina.out log file:

Code: Select all
Aug 14, 2009 3:08:45 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 14, 2009 3:08:45 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 421 ms
Aug 14, 2009 3:08:45 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 14, 2009 3:08:45 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Aug 14, 2009 3:08:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Aug 14, 2009 3:08:46 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
15:08:58,540  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
15:09:05,932  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
15:09:06,358  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
15:09:07,689 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/alfresco/alf_data
15:09:07,728 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply ...
15:09:07,897 User:System INFO  [admin.patch.PatchExecuter] No patches were required.
15:09:07,903 User:System INFO  [repo.module.ModuleServiceImpl] Found 1 module(s).
15:09:07,937 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.0.
15:09:13,127 User:System ERROR [alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
15:09:13,127 User:System ERROR [alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
15:09:13,346 User:System WARN  [alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
15:09:13,364 User:System INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_07-b06; maximum heap size 493.063MB
15:09:13,364 User:System WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 493.063MB is less than recommended 512MB
15:09:13,364 User:System INFO  [service.descriptor.DescriptorService] Alfresco started (Labs): Current version 3.0.0 (Stable 1526) schema 1002 - Installed version 3.0.0 (Stable 1526) schema 1002
2009-08-14 15:09:13.569::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2009-08-14 15:09:13.612::INFO:  jetty-6.1.14
2009-08-14 15:09:13.650::INFO:  Started SocketConnector@0.0.0.0:7070
Aug 14, 2009 3:09:20 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive studio.war
15:09:22,786  INFO  [web.scripts.DeclarativeRegistry] Registered 67 Web Scripts (+0 failed), 71 URLs
15:09:22,787  INFO  [web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 264.755ms)
15:10:23,095  INFO  [web.scripts.DeclarativeRegistry] Registered 101 Web Scripts (+0 failed), 105 URLs
15:10:23,096  INFO  [web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 60295.562ms)
15:10:23,142  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
Aug 14, 2009 3:10:23 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
15:10:25,036  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
Aug 14, 2009 3:10:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 14, 2009 3:10:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 99921 ms



Any help to run Alfresco from port 80 rather than 8080 will be appreciated.

Regards,
Davis Onsakia
mautidavis
Community Member
Community Member
 
Posts: 20
Joined: 31 Mar 2009, 15:11
Alfresco Version: 3.0

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby gronfelt » 18 Aug 2009, 12:40

I could see no errors regarding this issue in the catalina.out, what exactly is it that isn't working?

Anyway, here is a short introduction on how to use mod_jk with apache:

http://tomcat.apache.org/connectors-doc ... quick.html

You also need to enable the AJP connector in Tomcat, by uncommenting this part of server.xml:

Code: Select all
    <!-- Define an AJP 1.3 Connector on port 8009 -->
        <!--
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        -->


Of course you could also change the port number tomcat uses, from 8080 to 80, but that means that you would also have to locate all places where Alfresco references port 8080, so in my opinion it's easier and safer to use Apache and redirect any requests to port 80 to Tomcat.
Opportunity is missed by most people because it is dressed in overalls and looks like work. -- Thomas A Edison
Feel free to rate this post as useful if it was of any help to you.
User avatar
gronfelt
Community Guru
Community Guru
 
Posts: 272
Joined: 20 Apr 2009, 20:05
Location: Sweden
Alfresco Version: 3.2

25 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby mautidavis » 21 Aug 2009, 14:15

"
Of course you could also change the port number tomcat uses, from 8080 to 80, but that means that you would also have to locate all places where Alfresco references port 8080, so in my opinion it's easier and safer to use Apache and redirect any requests to port 80 to Tomcat."

How is this done?

Thanks.
Davis
mautidavis
Community Member
Community Member
 
Posts: 20
Joined: 31 Mar 2009, 15:11
Alfresco Version: 3.0

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby dannyboy » 21 Aug 2009, 21:30

To forward port 80 requests to port 8080 add the following in Alfresco/tomcat/conf/server.xml

Code: Select all
       <Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8"
      connectionTimeout="20000"
      redirectPort="8080"
      />

above:
Code: Select all
      <Connector port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8"
      connectionTimeout="20000"
      />


Edit: and the above poster is right, we need to keep 8080, you delete it. I am not sure where it is referenced in Alfresco's Java classes, but it is.
dannyboy
Community Member
Community Member
 
Posts: 12
Joined: 19 Aug 2009, 18:28
Alfresco Version: 3.2

0 Points (What is this?)

Re: resolving to port 80 instead of 8080

Postby gronfelt » 25 Aug 2009, 08:05

Would that work? I thought that the redirectPort attribute was used to redirect SSL traffic?

However, if it works it's probably the easiest solution.

Should it not work, then you'd have to go with using Apache with mod_jk. The document I previously linked to pretty much describes how to set it up. In a basic environment the config described could be used as it is. The only thing that needs to be changed is the mount point in tomcat. This should be:

Code: Select all
JkMount /* worker1


If you are planning on using both the Alfresco Explorer and Alfresco Share clients. You could then navigate to http://yourservername/alfresco or http://yourservername/share. If you only plan to use either one of the clients you could set the mount point to

Code: Select all
JkMount /alfresco/* worker1


or

Code: Select all
JkMount /share/* worker1


Depending on what client you want to use. You could then navigate to that client directly with just http://yourservername/.

There's also a forum thread describing the entire procedure, from installation of mod_jk to a working configuration:

viewtopic.php?f=9&t=20310

Please feel free to ask if you get stuck with anything.
Opportunity is missed by most people because it is dressed in overalls and looks like work. -- Thomas A Edison
Feel free to rate this post as useful if it was of any help to you.
User avatar
gronfelt
Community Guru
Community Guru
 
Posts: 272
Joined: 20 Apr 2009, 20:05
Location: Sweden
Alfresco Version: 3.2

25 Points (What is this?)


Return to Alfresco Discussion

Who is online

Users browsing this forum: No registered users and 1 guest