7 Replies Latest reply: Aug 11, 2012 9:37 PM by johnbarrett1 RSS

    Installing ColdFusion on port 80

    johnbarrett MeganK

      I am using the Mac with Lion, and I would like to use Tomcat, but like to use port 80, is this possible? I have looked all over the web, but could not find an answer.

      I think that it may be hard as port 80 is using apache. Any help would be great!

       

      thanks,

      Johnny

        • 1. Re: Installing ColdFusion on port 80
          12Robots Community Member

          You certainly can do it. It's quite easy.  The setting is in server.xml.  Just do a search ont he file for 8080 and replace it with 80. It should only be in one spot.

           

          You will, of course, need to do one of the following:

           

          - Disable Apache (Turn off web sharing)

          - Move Apache to a different port (I'm not sure hwo this is doen on Lion, sorry)

           

          One other option is to serve your Tomcat/CF sites through Apache. This is considerably more involved, but may offer additional benefits (URL Rewriting, etc).

           

          The CF10 installer will probably do the Apache config for you, I don't know, I have not tried it yet. So it may not be that involved at all. If you are planning to use CF9 or CF8 then it is more involved, but there are  sites out there with such instructions. You may need to use Linux instruction and modify them for the Mac. They are pretty similar.

           

          Good luck

           

          jason

          • 2. Re: Installing ColdFusion on port 80
            johnbarrett MeganK

            HI Jason,

             

            I found the server.xml in - /Applications/ColdFusion10/cfusion/runtime/conf but I don't see any referneces to 8080. Am I ooking in the wrong place? Blow is a cpoy of my server.xmk file

            thanks so much!

             

            Johnny

             

             

             

            server.xml

            <?xml version='1.0' encoding='utf-8'?>

            <!--

              Licensed to the Apache Software Foundation (ASF) under one or more

              contributor license agreements.  See the NOTICE file distributed with

              this work for additional information regarding copyright ownership.

              The ASF licenses this file to You under the Apache License, Version 2.0

              (the "License"); you may not use this file except in compliance with

              the License.  You may obtain a copy of the License at

             

             

                  http://www.apache.org/licenses/LICENSE-2.0

             

             

              Unless required by applicable law or agreed to in writing, software

              distributed under the License is distributed on an "AS IS" BASIS,

              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

              See the License for the specific language governing permissions and

              limitations under the License.

            -->

            <!-- Note:  A "Server" is not itself a "Container", so you may not

                 define subcomponents such as "Valves" at this level.

                 Documentation at /docs/config/server.html

            -->

            <Server port="8007" shutdown="SHUTDOWN">

             

             

              <!--APR library loader. Documentation at /docs/apr.html -->

              <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

              <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->

              <Listener className="org.apache.catalina.core.JasperListener" />

              <!-- Prevent memory leaks due to use of particular java/javax APIs-->

              <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />

              <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

             

             

              <!-- Global JNDI resources

                   Documentation at /docs/jndi-resources-howto.html

              -->

              <GlobalNamingResources>

                <!-- Editable user database that can also be used by

                     UserDatabaseRealm to authenticate users

                -->

                <Resource name="UserDatabase" auth="Container"

                          type="org.apache.catalina.UserDatabase"

                          description="User database that can be updated and saved"

                          factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

                          pathname="conf/tomcat-users.xml" />

              </GlobalNamingResources>

             

             

              <!-- A "Service" is a collection of one or more "Connectors" that share

                   a single "Container" Note:  A "Service" is not itself a "Container",

                   so you may not define subcomponents such as "Valves" at this level.

                   Documentation at /docs/config/service.html

               -->

              <Service name="Catalina">

             

                <!--The connectors can use a shared executor, you can define one or more named thread pools-->

                <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"

                    maxThreads="150" minSpareThreads="4"/>

               

               

                <!-- A "Connector" represents an endpoint by which requests are received

                     and responses are returned. Documentation at :

                     Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)

                     Java AJP  Connector: /docs/config/ajp.html

                     APR (HTTP/AJP) Connector: /docs/apr.html

                       Define a non-SSL HTTP/1.1 Connector on port 8500

             

             

                       Sets the protocol to handle incoming traffic. The default value is HTTP/1.1

                       which uses an auto-switching mechanism to select either a blocking Java based

                       connector or an APR/native based connector. If the PATH (Windows) or LD_LIBRARY_PATH

                       (on most unix systems) environment variables contain the Tomcat native library, the native/APR connector will be used.

                       If the native library cannot be found, the blocking Java based connector will be used.

                       Note that the native/APR connector has different settings for HTTPS than the Java connectors.

                     To use an explicit protocol rather than rely on the auto-switching mechanism described above, the following values may be used:

                              org.apache.coyote.http11.Http11Protocol - blocking Java connector

                              org.apache.coyote.http11.Http11NioProtocol - non blocking Java connector

                              org.apache.coyote.http11.Http11AprProtocol - the APR/native connector.

                    

                <Connector executor="tomcatThreadPool"

                           port="8500" protocol="org.apache.coyote.http11.Http11NioProtocol"

                           connectionTimeout="20000"

                           redirectPort="8445" />

                -->

                <!-- A "Connector" using the shared thread pool-->

                <!-- internal webserver start -->

                <Connector executor="tomcatThreadPool" maxThreads="50"

                           port="8500" protocol="org.apache.coyote.http11.Http11Protocol"

                           connectionTimeout="20000"

                           redirectPort="8445" />

                <!-- internal webserver end -->

             

             

                <!-- Define a SSL HTTP/1.1 Connector on port 8443

                     This connector uses the JSSE configuration, when using APR, the

                     connector should be using the OpenSSL style configuration

                     described in the APR documentation -->

                <!--

                <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

                           maxThreads="150" scheme="https" secure="true"

                           clientAuth="false" sslProtocol="TLS" />

                -->

             

             

                <!-- Define an AJP 1.3 Connector on port 8009 -->

                <Connector port="8012" protocol="AJP/1.3" redirectPort="8445" tomcatAuthentication="false" />

             

             

             

             

                <!-- An Engine represents the entry point (within Catalina) that processes

                     every request.  The Engine implementation for Tomcat stand alone

                     analyzes the HTTP headers included with the request, and passes them

                     on to the appropriate Host (virtual host).

                     Documentation at /docs/config/engine.html -->

             

             

                <Engine name="Catalina" defaultHost="localhost" jvmRoute="cfusion">

             

             

                  <!--For clustering, please take a look at documentation at:

                      /docs/cluster-howto.html  (simple how to)

                      /docs/config/cluster.html (reference documentation) -->

                  <!--

                  <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

                  -->       

             

             

                  <!-- Use the LockOutRealm to prevent attempts to guess user passwords

                       via a brute-force attack -->

                  <Realm className="org.apache.catalina.realm.LockOutRealm">

                    <!-- This Realm uses the UserDatabase configured in the global JNDI

                         resources under the key "UserDatabase".  Any edits

                         that are performed against this UserDatabase are immediately

                         available for use by the Realm.  -->

                    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

                           resourceName="UserDatabase"/>

                  </Realm>

             

             

                  <!-- Define the default virtual host

                       Note: XML Schema validation will not work with Xerces 2.2.

                   -->

                  <Host name="localhost"  appBase="webapps"

                        unpackWARs="true" autoDeploy="false">

             

             

                    <!-- SingleSignOn valve, share authentication between web applications

                         Documentation at: /docs/config/valve.html -->

                    <!--

                    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

                    -->

             

             

                    <!-- Access log processes all example.

                         Documentation at: /docs/config/valve.html

                         Note: The pattern used is equivalent to using pattern="common" -->

                    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 

                           prefix="localhost_access_log." suffix=".txt"

                           pattern="%h %l %u %t &quot;%r&quot; %s %b" resolveHosts="false"/>

                   <!-- Uncomment the line below to change the default web root or to add virtual directory

                        Make sure to replace <cf_home> with the absolute path to ColdFusion Home-->

                    <!-- To add virtual directory use aliases attribute .The list of aliases should be of the form

                    "/aliasPath1=docBase1,/aliasPath2=docBase2" where aliasPathN must include a leading '/' and

                    docBaseN must be an absolute path to a directory. -->

                    <!-- <Context path="/" docBase="<cf_home>\wwwroot" WorkDir="<cf_home>\runtime\conf\Catalina\localhost\tmp" ></Context>  -->

             

             

                  </Host>

                </Engine>

              </Service>

            </Server>

            • 3. Re: Installing ColdFusion on port 80
              Adam Cameron. Community Member

              It's 8500 (which is the default for CF10) in your case.  It's in the bit marked "internal webserver start".

               

              That said, if you've already got Apache running, why not just use Apache instead of Tomcat's web server?

               

              --

              Adam

              • 4. Re: Installing ColdFusion on port 80
                12Robots Community Member

                Ooops, yeah, 8500. Thanks Adam.  I was thinking of a plain Tomcat install.

                 

                jason

                • 5. Re: Installing ColdFusion on port 80
                  johnbarrett1 Community Member

                  Hi Adam & Jason,

                  Thanks so much for your help!

                   

                  Last night I did re install using apache under port 80. I don't know the difference with tomcat & port 8500 with the interal webserver over using apache & port 80, except now I have things the way I like it, and I understand the apache config file a little.

                   

                  thanks so much for your help

                  Johnnny

                  • 6. Re: Installing ColdFusion on port 80
                    Adam Cameron. Community Member

                    Glad you got it all working.  For dev, I don't think it really matters what web server one uses, unless one actually needs to leverage various features that Apache or IIS or [whatever] offer as well as just serving web pages.  At home I can't be bothered setting up a different webserver, so just use the JWS with CF9 and Tomcat with CF10.  But all I need to do is tinker around; I do all my work in my workplace, and we've got IIS there set up to mirror the prod environment.  However the key benefit to using Apache at home is something you touched on... getting used to using Apache.  It's a handy skill to have.

                     

                    --

                    Adam

                    • 7. Re: Installing ColdFusion on port 80
                      johnbarrett1 Community Member

                      Yeah I a so happy that I got it working the way I want again. Yes I am very comfortable in Apache, can d what I want with it, and like working with it. I should lern IIS, and others, but  am happy to everything in apache, as I work on the Mac, and host on a Linux box so my workflow is always apache

                       

                      Not sure about IIS, but creating viral hosts in apache is easy, that is waht I do for each client, and that becomes the server enviroment, which matches where I host, so it is a happy dev set up.

                       

                      thanks so much!

                      Johnny