Template:ApacheOXConf: Difference between revisions
From Open-Xchange
No edit summary |
No edit summary |
||
(30 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Configure the '' | Configure the ''mod_proxy_{{#if:{{{connector|}}}|{{{connector}}}|ajp}}'' module by creating a new Apache configuration file. | ||
$ vim {{#if:{{{connectorConf|}}}|{{{connectorConf}}}|{{{ajpconf}}}}} | |||
{{#if:{{{release}}}|{{#ifeq:{{{release|}}}|6.22| | |||
{{#if:{{{release}}}|{{#ifeq:{{{release|}}}|6.22| | |||
<Location /webservices> | <Location /webservices> | ||
# Please note that the servlet path to the soap API has changed: | |||
# restrict access to the soap provisioning API | # restrict access to the soap provisioning API | ||
Order Deny,Allow | Order Deny,Allow | ||
Line 13: | Line 13: | ||
# Allow from 192.168 10 172.16 | # Allow from 192.168 10 172.16 | ||
</Location> | </Location> | ||
# the old path is kept for compatibility reasons | # the old path is kept for compatibility reasons|}}|}} | ||
|}}|}} | |||
<Location /servlet/axis2/services> | <Location /servlet/axis2/services> | ||
# restrict access to the soap provisioning API | # restrict access to the soap provisioning API | ||
Order Deny,Allow | Order Deny,Allow | ||
Deny from all | Deny from all | ||
Line 23: | Line 22: | ||
# Allow from 192.168 10 172.16 | # Allow from 192.168 10 172.16 | ||
</Location> | </Location> | ||
{{{loadmodule}}} | {{{loadmodule}}} | ||
<IfModule | <IfModule mod_proxy_{{#if:{{{connector|}}}|{{{connector}}}|ajp}}.c> | ||
ProxyRequests Off | ProxyRequests Off | ||
{{#ifeq: {{{connector}}} | http | {{Template:ApacheAppSuiteConf/httpProxyPreserveHost}} | }} | |||
<Proxy balancer://oxcluster> | <Proxy balancer://oxcluster> | ||
Order deny,allow | Order deny,allow | ||
Allow from all | Allow from all | ||
# multiple server setups need to have the hostname inserted instead localhost | # multiple server setups need to have the hostname inserted instead localhost | ||
BalancerMember ajp://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1 | BalancerMember {{#if:{{{connector|}}}|{{{connector}}}|ajp}}://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1 | ||
# Enable and maybe add additional hosts running OX here | # Enable and maybe add additional hosts running OX here | ||
# BalancerMember ajp://oxhost2:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX2 | # BalancerMember {{#if:{{{connector|}}}|{{{connector}}}|ajp}}://oxhost2:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX2 | ||
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On | |||
{{#ifeq: {{{connector}}} | http | | |||
SetEnv proxy-initial-not-pooled | |||
SetEnv proxy-sendchunked | |||
| }} | |||
</Proxy> | </Proxy> | ||
{{#ifeq: {{{connector}}} | http | {{Template:ApacheAppSuiteConf/easHttpProxy|syncProxyName={{{easProxyName}}}}} | }} | |||
# OX frontend | |||
<Proxy /ajax> | <Proxy /ajax> | ||
ProxyPass balancer://oxcluster/ajax | ProxyPass balancer://oxcluster/ajax | ||
Line 52: | Line 55: | ||
ProxyPass balancer://oxcluster/publications | ProxyPass balancer://oxcluster/publications | ||
</Proxy> | </Proxy> | ||
# USM | |||
<Proxy /usm-json> | <Proxy /usm-json> | ||
ProxyPass balancer://oxcluster/usm-json | ProxyPass balancer://oxcluster/usm-json | ||
</Proxy> | </Proxy> | ||
# SOAP | |||
<Proxy /webservices> | <Proxy /webservices> | ||
ProxyPass balancer://oxcluster/webservices | ProxyPass balancer://oxcluster/webservices | ||
</Proxy> | |||
{{#ifeq: {{{connector}}} | http | | |||
<Proxy /realtime> | |||
ProxyPass balancer://oxcluster/realtime | |||
</Proxy> | |||
| }} | |||
# OXtender{{#ifeq: {{{connector}}} | http | /EAS specific proxy container with higher timeout | }} | |||
<Proxy /Microsoft-Server-ActiveSync> | |||
ProxyPass balancer://{{#if:{{{easProxyName|}}}|{{{easProxyName}}}|oxcluster}}/Microsoft-Server-ActiveSync | |||
</Proxy> | </Proxy> | ||
</IfModule> | </IfModule> | ||
Modify the default website settings to display the Open-Xchange GUI | Modify the default website settings to display the Open-Xchange GUI |
Latest revision as of 18:53, 15 May 2015
Configure the mod_proxy_{{#if:|{{{connector}}}|ajp}} module by creating a new Apache configuration file.
$ vim {{#if:|{{{connectorConf}}}|{{{ajpconf}}}}}
{{#if:{{{release}}}|{{#ifeq:|6.22| <Location /webservices> # Please note that the servlet path to the soap API has changed: # restrict access to the soap provisioning API Order Deny,Allow Deny from all 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 Order Deny,Allow Deny from all Allow from 127.0.0.1 # you might add more ip addresses / networks here # Allow from 192.168 10 172.16 </Location> {{{loadmodule}}} <IfModule mod_proxy_{{#if:|{{{connector}}}|ajp}}.c> ProxyRequests Off {{#ifeq: {{{connector}}} | http | # When enabled, this option will pass the Host: line from the incoming request to the proxied host. ProxyPreserveHost On | }} <Proxy balancer://oxcluster> Order deny,allow Allow from all # multiple server setups need to have the hostname inserted instead localhost BalancerMember {{#if:|{{{connector}}}|ajp}}://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1 # Enable and maybe add additional hosts running OX here # BalancerMember {{#if:|{{{connector}}}|ajp}}://oxhost2:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX2 ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On {{#ifeq: {{{connector}}} | http | SetEnv proxy-initial-not-pooled SetEnv proxy-sendchunked | }} </Proxy> {{#ifeq: {{{connector}}} | http | # Define another Proxy Container with different timeout for the sync clients. Microsoft recommends a minimum value of 15 minutes. # Setting the value lower than the one defined as com.openexchange.usm.eas.ping.max_heartbeat in eas.properties will lead to connection # timeouts for clients. See http://support.microsoft.com/?kbid=905013 for additional information. # # NOTE for Apache versions < 2.4: # When using a single node system or using BalancerMembers that are assigned to other balancers please add a second hostname for that # BalancerMember's IP so Apache can treat it as additional BalancerMember with a different timeout. # # Example from /etc/hosts: 127.0.0.1 localhost localhost_sync # # Alternatively select one or more hosts of your cluster to be restricted to handle only eas/usm requests <Proxy balancer://{{{easProxyName}}}> Order deny,allow Allow from all # multiple server setups need to have the hostname inserted instead localhost BalancerMember http://localhost_sync:8009 timeout=1900 smax=0 ttl=60 retry=60 loadfactor=50 route=APP1 # Enable and maybe add additional hosts running OX here # BalancerMember http://oxhost2:8009 timeout=1900 smax=0 ttl=60 retry=60 loadfactor=50 route=APP2 ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On SetEnv proxy-initial-not-pooled SetEnv proxy-sendchunked </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> {{#ifeq: {{{connector}}} | http | <Proxy /realtime> ProxyPass balancer://oxcluster/realtime </Proxy> | }} # OXtender{{#ifeq: {{{connector}}} | http | /EAS specific proxy container with higher timeout | }} <Proxy /Microsoft-Server-ActiveSync> ProxyPass balancer://{{#if:|{{{easProxyName}}}|oxcluster}}/Microsoft-Server-ActiveSync </Proxy> </IfModule>
Modify the default website settings to display the Open-Xchange GUI
$ vim {{{apacheconf}}}
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot {{{docroot}}} <Directory {{{docroot}}}> AllowOverride None Order allow,deny allow from all RedirectMatch ^/$ /ox6/ Options +FollowSymLinks +SymLinksIfOwnerMatch </Directory> # deflate AddOutputFilterByType DEFLATE text/html text/plain text/javascript application/javascript text/css text/xml application/xml text/x-js application/x-javascript # pre-compressed files AddType text/javascript .jsz AddType text/css .cssz AddType text/xml .xmlz AddType text/plain .po AddEncoding gzip .jsz .cssz .xmlz SetEnvIf Request_URI "\.(jsz|cssz|xmlz)$" no-gzip ExpiresActive On <Location /ox6> # Expires (via ExpiresByType to override global settings) ExpiresByType image/gif "access plus 6 months" ExpiresByType image/png "access plus 6 months" ExpiresByType image/jpg "access plus 6 months" ExpiresByType image/jpeg "access plus 6 months" ExpiresByType text/css "access plus 6 months" ExpiresByType text/html "access plus 6 months" ExpiresByType text/xml "access plus 6 months" ExpiresByType text/javascript "access plus 6 months" ExpiresByType text/x-js "access plus 6 months" ExpiresByType application/x-javascript "access plus 6 months" ExpiresDefault "access plus 6 months" Header append Cache-Control "private" Header unset Last-Modified Header unset Vary # Strip version RewriteEngine On RewriteRule v=\w+/(.+) $1 [L] # Turn off ETag Header unset ETag FileETag None </Location> <Location /ox6/ox.html> ExpiresByType text/html "now" ExpiresDefault "now" Header unset Last-Modified Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" # Turn off ETag Header unset ETag FileETag None </Location> <Location /ox6/index.html> ExpiresByType text/html "now" ExpiresDefault "now" Header unset Last-Modified Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" # Turn off ETag Header unset ETag FileETag None </Location> </VirtualHost>