-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathricgraph_explorer.conf-apache
107 lines (96 loc) · 4.27 KB
/
ricgraph_explorer.conf-apache
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# ########################################################################
#
# Ricgraph - Research in context graph
#
# ########################################################################
#
# MIT License
#
# Copyright (c) 2024 Rik D.T. Janssen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# ########################################################################
#
# This file is an example Apache configuration file, containing a
# VirtualHost on port 80 (standard http port) for both Ricgraph Explorer,
# a web based tool to access Ricgraph, and the Ricgraph REST API.
# To be able to use this, enable the Apache modules mod_proxy and
# mod_proxy_http.
#
# Apache proxies to a local host and port (see below). On that host/port
# runs the WSGI Gunicorn server using Uvicorn for ASGI applications.
# That is done, since a ASGI application server is good practise for
# a REST API.
#
# WARNING:
# Note that this file, as it is now, serves Ricgraph Explorer and the
# Ricgraph REST API on a http connection, not secured (no https),
# and without authentication.
# At least you should change this file to use https.
# You have to make modifications yourself, since there are too many
# site specific settings to give example code.
# Examples of these settings are your external IP address, hostname,
# web server, domain name, SSL certificate provider, authentication source, etc.
#
# READ THIS:
# To prevent accidental exposure of data in Ricgraph to the outside world,
# the lines starting with 'ProxyPass' have been commented.
# Please read the warning above and take appropriate
# measures before uncommenting it and starting Apache.
#
# Original version Rik D.T. Janssen, February, May 2024.
#
# ########################################################################
Define RICGRAPH_PATH "/opt/ricgraph_venv"
Define APACHE_LOGDIR "/var/log/apache2"
# You might want to change the '*' to the IP address Apache is listening on.
<VirtualHost *:80>
DocumentRoot "${RICGRAPH_PATH}/ricgraph_explorer"
# Replace with your domain name
#ServerName www.example.com
# Replace with your email address
#ServerAdmin webmaster@example.com
# Loose some time with IP address lookups
HostnameLookups On
# Performance improvement: make Apache serve static files,
# because that is faster than WSGI serving static files.
Alias /static/ "${RICGRAPH_PATH}/ricgraph_explorer/static/"
<Directory "${RICGRAPH_PATH}/ricgraph_explorer/static/">
Require all granted
</Directory>
# The hostname (127.0.0.1) and port (3030) below correspond to the
# hostname and port where Gunicorn is running. These parameters
# are set in file 'ricgraph_explorer_gunicorn.service'.
# If you change these, also change them in that file.
# ########## Please modify
# To prevent accidental use, the lines with 'ProxyPass'
# have been commented. Remove the comment to make it work.
# See 'Warning' and 'Read this' at the start of this file.
#ProxyPass / http://127.0.0.1:3030/
#ProxyPassReverse / http://127.0.0.1:3030/
# ########## End of please modify
ProxyPreserveHost On
CustomLog ${APACHE_LOGDIR}/ricgraph_explorer.log ssl_combined
ErrorLog ${APACHE_LOGDIR}/ricgraph_explorer-error.log
TransferLog ${APACHE_LOGDIR}/ricgraph_explorer-access.log
</VirtualHost>
#
# You may want to add extensions for SSL (https) or authentication below.
#