Results 1 to 4 of 4

Thread: Binding to Ports (per IP?)

  1. #1
    Join Date
    May 2007
    Posts
    20
    Rep Power
    8

    Default Binding to Ports (per IP?)

    I have a single server that is running Apache (port 80 and 443).
    This same server is hosting Zimbra - which is running IMAP over port 8443.

    I have two IP addresses assigned to this single machine.

    With Apache I believe I can assign the 443 ports to respond to a single specific IP rather than "*" (all).
    Is it possible to bind Zimbra to the other IP for port 433 and not 8443?

    I found in the tomcat conf directory a file called server.xml

    This has in it the 8443 specification.
    I presume this does the connection (tunnel/sockets/port-forward or whatever) and i would need to change this to 433, but how would I bind this to only one specific IP address?

    In the end I would end up editing my DNS server entry for the mail.site.com to point to the 2nd IP for the tomcat (right)?

    Thanks for any help, clarification, or redirection.



    --Mike

  2. #2
    Join Date
    May 2007
    Posts
    20
    Rep Power
    8

    Default

    Alternative solution ???

    Would it be possible to have apache (or some app/cgi/script) that runs on the server forward to/from all requests to/from the 8443 port from/to the 80 port?

    Then a user could use http://mail.site.com (default port 80) and actually be getting to http://mail.site.com:8443 ?? (so the redirection could be done all internally on the localhost server)

    Is this possible?

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Have a look at this article in the wiki.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    Join Date
    May 2007
    Posts
    20
    Rep Power
    8

    Default

    Its a good article - thanks for helping me to find it.

    however i have now tried both options and found neither works.

    Option 1 (mod-proxy) results in a web page with a few non standard ascii characters

    option 2 (mod-jk) rseults in apache doing the forward (it appears) but tomcat not receiving the results:
    error-log:
    Code:
    [Sun Jun 03 16:25:20 2007] [23883:47520] [info]  jk_handler::mod_jk.c (2063): Service error=0 for worker=zimbra
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  jk_open_socket::jk_connect.c (450): connect to 127.0.0.1:8019 failed with errno=111
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_connect_to_endpoint::jk_ajp_common.c (872): Failed opening socket to (127.0.0.1:8019) with (errno=111)
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_send_request::jk_ajp_common.c (1247): (zimbra) error connecting to the backend server (errno=111)
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_service::jk_ajp_common.c (1867): (zimbra) sending request to tomcat failed,  recoverable operation attempt=1
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  jk_open_socket::jk_connect.c (450): connect to 127.0.0.1:8019 failed with errno=111
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_connect_to_endpoint::jk_ajp_common.c (872): Failed opening socket to (127.0.0.1:8019) with (errno=111)
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_send_request::jk_ajp_common.c (1247): (zimbra) error connecting to the backend server (errno=111)
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  ajp_service::jk_ajp_common.c (1867): (zimbra) sending request to tomcat failed,  recoverable operation attempt=2
    [Sun Jun 03 16:30:25 2007] [20392:47520] [error] ajp_service::jk_ajp_common.c (1879): (zimbra) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
    [Sun Jun 03 16:30:25 2007] zimbra 208.109.162.164 0.000761
    [Sun Jun 03 16:30:25 2007] [20392:47520] [info]  jk_handler::mod_jk.c (2063): Service error=0 for worker=zimbra
    Here is what was in the xml file:
    Code:
            <Connector port="6080"
                       acceptCount="1024" URIEncoding="UTF-8"
                       enableLookups="false" redirectPort="8443"
                       compression="on"
                       compressionMinSize="1024"
                       compressableMimeType="text/html,text/plain,text/css"
                       noCompressionUserAgents=".*MSIE 6.*"
                       maxThreads="100" minSpareThreads="100" maxSpareThreads="100"/>
    ....
    <!-- for mod_jk -->
    <Connector port="8019" acceptCount="1024" enableLookups="false" redirectPort="6443" protocol="AJP/1.3" />
    <!-- for mod_jk -->
    the instructions to restart tomcat didn't specify user, so i tried the following:
    as user zimbra (and user root) /opt/zimbra/tomcat/bin/startup.sh (or shutdown.sh)
    I tried starting zmcontrol (as user zimbra).
    i did notice that my pop3 access was not working under this configuration.

    I did try 8009 and 8019 (as you see above) in case there was a conflict with another usage of the 8009 port - same results found in log file were posted above.

Similar Threads

  1. Replies: 32
    Last Post: 03-18-2011, 11:03 AM
  2. I got Ubuntu and Zimbra working
    By pacsteel in forum Installation
    Replies: 73
    Last Post: 06-23-2008, 11:41 AM
  3. Another DNS Thread - Internal and External IP
    By Mo_Hong in forum Administrators
    Replies: 4
    Last Post: 08-31-2006, 09:40 AM
  4. Forcing Tomcat to a Single IP
    By wdimmit in forum Administrators
    Replies: 2
    Last Post: 02-06-2006, 02:23 PM
  5. Firewall ports I have opened up
    By robroadie in forum Administrators
    Replies: 1
    Last Post: 11-10-2005, 07:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •