Announcement

Collapse
No announcement yet.

OX and Apache2 v2.4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OX and Apache2 v2.4

    Hello,

    I'm trying to use apache2 v2.4 for serving the appsuite of ox. The problem is, that apache does not start once I enable proxy_http.conf (for gizzly).

    Has anyone successfully tried to use a2 2.4 in connection with ox or is more familiar wir the configuration of that version of a2?

    My proxy_http.conf is:
    Code:
    # Please note that the servlet path to the soap API has changed:
    <Location /webservices>
        # restrict access to the soap provisioning API
        Require all denied
        Allow from 127.0.0.1
        # you might add more ip addresses / networks here
        # Allow from 192.168 10 172.16
    </Location>
    
    # the old path is kept for compatibility reasons
    <Location /servlet/axis2/services>
        # restrict access to the soap provisioning API
        Require all denied
        Allow from 127.0.0.1
        # you might add more ip addresses / networks here
        # Allow from 192.168 10 172.16
    </Location>
    
    
    
    <IfModule mod_proxy_http.c>
       ProxyRequests Off
       # When enabled, this option will pass the Host: line from the incoming request to the proxied host.
       ProxyPreserveHost Off
       <Proxy balancer://oxcluster>
           Require all granted
           # multiple server setups need to have the hostname inserted instead localhost
           BalancerMember http://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1
           # Enable and maybe add additional hosts running OX here
           # BalancerMember http://oxhost2:8009 timeout=100  smax=0 ttl=60 retry=60 loadfactor=50 route=OX2
          ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
          SetEnv proxy-initial-not-pooled
          SetEnv proxy-sendchunked
       </Proxy>
       # Microsoft recommends a minimum timeout value of 15 minutes for eas connections
       <Proxy balancer://eas_oxcluster>
          Require all granted
          # multiple server setups need to have the hostname inserted instead localhost
          BalancerMember http://localhost:8009 timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1
          # Enable and maybe add additional hosts running OX here
          # BalancerMember http://oxhost2:8009 timeout=1800  smax=0 ttl=60 retry=60 loadfactor=50 route=OX2
          ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
          SetEnv proxy-initial-not-pooled
          SetEnv proxy-sendchunked
       </Proxy>
       # OX AppSuite frontend
       <Proxy /appsuite/api>
           ProxyPass balancer://oxcluster/ajax
       </Proxy>
    
       # OX frontend
       <Proxy /ajax>
           ProxyPass balancer://oxcluster/ajax
       </Proxy>
       <Proxy /servlet>
           ProxyPass balancer://oxcluster/servlet
       </Proxy>
       <Proxy /infostore>
           ProxyPass balancer://oxcluster/infostore
       </Proxy>
       <Proxy /publications>
           ProxyPass balancer://oxcluster/publications
       </Proxy>
       # USM
       <Proxy /usm-json>
           ProxyPass balancer://oxcluster/usm-json
       </Proxy>
       # SOAP
       <Proxy /webservices>
           ProxyPass balancer://oxcluster/webservices
      </Proxy>
      <Proxy /realtime>
           ProxyPass balancer://oxcluster/realtime
      </Proxy>
       # OXtender/EAS specific proxy container with higher timeout
       <Proxy /Microsoft-Server-ActiveSync>
           ProxyPass balancer://eas_oxcluster/Microsoft-Server-ActiveSync
       </Proxy>
    </IfModule>
    Many thanks in advance
    Viele Grüße
    Rene

    OS: Ubuntu Server amd64 20.4 LTS
    JRE: openjdk-8-jre, Maria-DB, Apache 2.4, Dovecot
    OX-Server backend: OXSE latest
    OX-frontend: OX appsuite latest

  • #2
    We are using OX/grizzly with an even older apache 2.2 (Debian 6). What does the apache log / error log say?

    The most notable difference in the proxy_http.conf is that we use "ProxyPreserveHost On". But I do not think, that this should lead to an error state.

    Regards.

    Comment


    • #3
      This is what the apache2 error.log says:
      Code:
      [Thu Oct 24 09:45:46.159087 2013] [proxy:crit] [pid 1473] AH02432: Cannot find LB Method: byrequests
      [Thu Oct 24 09:45:46.204362 2013] [proxy_balancer:emerg] [pid 1473] (22)Invalid argument: AH01183: Cannot share balancer
      [Thu Oct 24 09:45:46.204528 2013] [:emerg] [pid 1473] AH00020: Configuration Failed, exiting
      I used "ProxyPreserveHost Off" with apache2 v2.2 successfully as well.
      Viele Grüße
      Rene

      OS: Ubuntu Server amd64 20.4 LTS
      JRE: openjdk-8-jre, Maria-DB, Apache 2.4, Dovecot
      OX-Server backend: OXSE latest
      OX-frontend: OX appsuite latest

      Comment


      • #4
        Hi,

        Originally posted by 881822 View Post
        Has anyone successfully tried to use a2 2.4 in connection with ox or is more familiar wir the configuration of that version of a2?
        we've already evaluated Apache 2.4, too. I'll post you our observations so far, but please keep in mind that Apache 2.4 is not yet distributed by the supported platforms. We'll update the official documentation accordingly if this becomes the case.

        Cheers
        Martin

        Code:
        Having apache 2.4 at a supported distro is still a way to go. However, here are some changes we need to take care at documentation when describing ox setup. Tested with Debian Jessie.
        
        * etc/conf.d has moved to etc/conf-available. Configuration files can be en/disabled like:
        a2enconf ox-proxy_http
        a2enconf redirect
        
        * mod_proxy has been refactored, separate lb modules are now available
        a2enmod lbmethod_byrequests
        
        Also, it looks like the mod_proxy syntax has been altered with 2.4
        
        <Proxy /ajax>
          ProxyPass http://localhost:8009/ajax
        </Proxy>
        
        will no longer work, but
        
        <Location /ajax>
          ProxyPass http://localhost:8009/ajax
        </Location>
        
        and 
        
        ProxyPass /ajax http://localhost:8009/ajax
        
        works.

        Comment


        • #5
          That's it. I had to activate the mod "lbmethod_byrequests".

          My "proxy_http.conf" now contains:
          Code:
          # Please note that the servlet path to the soap API has changed:
          <Location /webservices>
              # restrict access to the soap provisioning API
              Require all denied
              Allow from 127.0.0.1
              # you might add more ip addresses / networks here
              # Allow from 192.168 10 172.16
          </Location>
          
          # the old path is kept for compatibility reasons
          <Location /servlet/axis2/services>
              # restrict access to the soap provisioning API
              Require all denied
              Allow from 127.0.0.1
              # you might add more ip addresses / networks here
              # Allow from 192.168 10 172.16
          </Location>
          
          
          
          <IfModule mod_proxy_http.c>
             ProxyRequests Off
             # When enabled, this option will pass the Host: line from the incoming request to the proxied host.
             ProxyPreserveHost Off
             <Proxy balancer://oxcluster>
                 Require all granted
                 # multiple server setups need to have the hostname inserted instead localhost
                 BalancerMember http://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1
                 # Enable and maybe add additional hosts running OX here
                 # BalancerMember http://oxhost2:8009 timeout=100  smax=0 ttl=60 retry=60 loadfactor=50 route=OX2
                ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
                SetEnv proxy-initial-not-pooled
                SetEnv proxy-sendchunked
             </Proxy>
             # Microsoft recommends a minimum timeout value of 15 minutes for eas connections
             <Proxy balancer://eas_oxcluster>
                Require all granted
                # multiple server setups need to have the hostname inserted instead localhost
                BalancerMember http://localhost:8009 timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1
                # Enable and maybe add additional hosts running OX here
                # BalancerMember http://oxhost2:8009 timeout=1800  smax=0 ttl=60 retry=60 loadfactor=50 route=OX2
                ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
                SetEnv proxy-initial-not-pooled
                SetEnv proxy-sendchunked
             </Proxy>
             # OX AppSuite frontend
             <Location /appsuite/api>
                 ProxyPass balancer://oxcluster/ajax
             </Location>
          
             # OX frontend
             <Location /ajax>
                 ProxyPass balancer://oxcluster/ajax
             </Location>
             <Location /servlet>
                 ProxyPass balancer://oxcluster/servlet
             </Location>
             <Location /infostore>
                 ProxyPass balancer://oxcluster/infostore
             </Location>
             <Location /publications>
                 ProxyPass balancer://oxcluster/publications
             </Location>
             # USM
             <Location /usm-json>
                 ProxyPass balancer://oxcluster/usm-json
             </Location>
             # SOAP
             <Location /webservices>
                 ProxyPass balancer://oxcluster/webservices
            </Location>
            <Location /realtime>
                 ProxyPass balancer://oxcluster/realtime
            </Location>
             # OXtender/EAS specific proxy container with higher timeout
             <Location /Microsoft-Server-ActiveSync>
                 ProxyPass balancer://eas_oxcluster/Microsoft-Server-ActiveSync
             </Location>
          </IfModule>
          Thanks you very much for support.
          Viele Grüße
          Rene

          OS: Ubuntu Server amd64 20.4 LTS
          JRE: openjdk-8-jre, Maria-DB, Apache 2.4, Dovecot
          OX-Server backend: OXSE latest
          OX-frontend: OX appsuite latest

          Comment

          Working...
          X