add modules and missing config options
[mkws-moved-to-github.git] / tools / apache2 / jasmine-dev.template
1 # Configuration for the apache web server                 -*- apache -*-
2
3 #####################################################################
4 # global apache2 config
5 #
6 User ${APACHE_RUN_USER}
7 Group ${APACHE_RUN_GROUP}
8 PidFile ${APACHE_PID_FILE}
9
10 ServerRoot ${APACHE_SERVER_ROOT}
11 NameVirtualHost *:${APACHE_PORT}
12 Listen ${APACHE_PORT}
13
14 LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
15
16 Include /etc/apache2/mods-enabled/alias.load
17 Include /etc/apache2/mods-enabled/authz*.load
18 Include /etc/apache2/mods-enabled/proxy*.load
19 Include /etc/apache2/mods-enabled/rewrite.load
20 Include /etc/apache2/mods-enabled/headers.load
21 Include /etc/apache2/mods-enabled/mime.load
22 Include /etc/apache2/mods-enabled/deflate.load
23
24 Include /etc/apache2/mods-enabled/alias*.conf
25 Include /etc/apache2/mods-enabled/authz*.conf
26 Include /etc/apache2/mods-enabled/proxy*.conf
27 Include /etc/apache2/mods-enabled/mime.conf
28 Include /etc/apache2/mods-enabled/deflate.conf
29
30 # pazpar2 / service proxy config
31 <VirtualHost *:${APACHE_PORT}>
32     ServerName localhost
33     ServerAlias mkws-dev a.mkws.indexdata.com a.mkws-dev.indexdata.com mkws-dev.indexdata.com 127.0.0.1
34
35     ServerAdmin webmaster@indexdata.com
36     ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error.log
37     CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access.log combined
38
39     RewriteEngine on
40     RewriteLogLevel 1
41     RewriteLog ${APACHE_LOG_DIR}/mkws-jasmine-rewrite.log 
42
43     DocumentRoot ${MKWS_ROOT}/examples/htdocs
44     Alias /tools/htdocs ${MKWS_ROOT}/tools/htdocs
45
46     # CORS setting
47     Header set Access-Control-Allow-Credentials true
48     Header set Access-Control-Allow-Origin "*"
49
50     # compress text output
51     <Location />
52         AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
53         SetOutputFilter DEFLATE 
54     </Location> 
55
56     # jasmine test account
57     RewriteRule /service-proxy-testauth  /service-proxy/?command=auth&action=login&username=mkwstest&password=mkwstest [P] # [NE,P]
58
59     # mkws devel account (e.g. memached testing)
60     RewriteRule /service-proxy-auth  /service-proxy/?command=auth&action=login&username=mkwsdev&password=mkwsdev [P] # [NE,P]
61
62     ProxyPass        /service-proxy/ http://mkc.indexdata.com:9009/service-proxy/
63     ProxyPassReverse /service-proxy/ http://mkc.indexdata.com:9009/service-proxy/
64
65     ProxyPass        /pazpar2/         http://localhost:8004/pazpar2/
66     ProxyPassReverse /pazpar2/         http://localhost:8004/pazpar2/
67
68 </VirtualHost>
69