summaryrefslogtreecommitdiff
path: root/doc/examples/hydrilla.example.com.conf
blob: 0d94c05abb8174745d0f906f582bc7da60f2f498 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# SPDX-License-Identifier: CC0-1.0

# Sample Apache2 configuration file for Hydrilla server (over unencrypted HTTP).
#
# Copyright (C) 2022 Wojtek Kosior


# Please adapt this file according to your needs can place it file under
# Apache2's available site configs directory which will be
# /etc/apache2/sites-available/ or similar. Then, enable it using the following
# command:
#    a2ensite hydrilla.example.com
# The new configuration will only take effect after you restart/reload Apache2
# daemon.

# Keep in mind that due to some external limitations Haketilo will not connect
# to HTTP Hydrilla servers running elsewhere than localhost. To get a working
# public Hydrilla server you should obtain a TLS certificate and use the
# attached hydrilla.example.com.tls.conf file instead of this one.

# This configuration file assumes Hydrilla is installed under Python's default
# load path and that the attached hydrilla.wsgi sample script has been saved as
# /var/lib/hydrilla/wsgi/hydrilla.wsgi

<VirtualHost *:80>
  ServerName hydrilla.example.com
  ServerAdmin admin@example.com

  DocumentRoot /var/lib/hydrilla/malcontent_dir

  <Directory /var/lib/hydrilla/malcontent_dir >
    Require all granted
  </Directory>

  <Directory ~ "^/var/lib/hydrilla/malcontent_dir/(resource|mapping)/" >
    ForceType application/json
  </Directory>

  WSGIScriptReloading On

  <Directory /var/lib/hydrilla/wsgi >
    Require all granted
  </Directory>

  WSGIScriptAliasMatch "^/((resource|mapping)/[^/]+[.]json|query)$" "/var/lib/hydrilla/wsgi/hydrilla.wsgi/$1"

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>