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