Skip to content

Commit 408d166

Browse files
authored
Changes Example to use Apache2 (#916)
* Disables PatchSubmodelElementByPathValueOnly Endpoint for SubmodelElementList * Disables Tests for PatchSubmodelElementByPathValueOnly Endpoint for SubmodelElementList * Changes NGINX Revers Proxy to Apache2 because of URL Encoding issues * Adapts workflow
1 parent 58084c1 commit 408d166

9 files changed

Lines changed: 74 additions & 63 deletions

File tree

.github/workflows/examples_test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
- name: Stop BaSyx Minimal Example
115115
run: docker compose -f examples/BaSyxMinimal/docker-compose.yml down
116116

117-
test-basyx-nginx:
117+
test-basyx-reverse-proxy:
118118
runs-on: ubuntu-latest
119-
name: Test BaSyx NGINX Example
119+
name: Test BaSyx Reverse Proxy Example
120120
steps:
121121
- uses: actions/checkout@v5
122122

@@ -127,11 +127,11 @@ jobs:
127127
distribution: 'adopt'
128128
cache: maven
129129

130-
- name: Start BaSyx NGINX Example
131-
run: docker compose -f examples/BaSyxNGINX/docker-compose.yml up -d
130+
- name: Start BaSyx Reverse Proxy Example
131+
run: docker compose -f examples/BaSyxReverseProxy/docker-compose.yml up -d
132132

133-
- name: Stop BaSyx NGINX Example
134-
run: docker compose -f examples/BaSyxNGINX/docker-compose.yml down
133+
- name: Stop BaSyx Reverse Proxy Example
134+
run: docker compose -f examples/BaSyxReverseProxy/docker-compose.yml down
135135

136136
test-basyx-operation-delegation:
137137
runs-on: ubuntu-latest

examples/BaSyxNGINX/nginx/nginx.conf

Lines changed: 0 additions & 52 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

examples/BaSyxNGINX/aas/test_demo_full_example.xml renamed to examples/BaSyxReverseProxy/aas/test_demo_full_example.xml

File renamed without changes.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Minimal Apache HTTP Server configuration for reverse proxy
2+
3+
ServerRoot "/usr/local/apache2"
4+
Listen ${PORT}
5+
ServerName ${HOSTNAME}
6+
ErrorLog /dev/stderr
7+
CustomLog /dev/stdout combined
8+
User daemon
9+
Group daemon
10+
11+
# Load required modules
12+
LoadModule mpm_event_module modules/mod_mpm_event.so
13+
LoadModule unixd_module modules/mod_unixd.so
14+
LoadModule log_config_module modules/mod_log_config.so
15+
LoadModule authz_core_module modules/mod_authz_core.so
16+
LoadModule proxy_module modules/mod_proxy.so
17+
LoadModule proxy_http_module modules/mod_proxy_http.so
18+
LoadModule headers_module modules/mod_headers.so
19+
20+
# Virtual host for reverse proxy
21+
<VirtualHost *:${PORT}>
22+
<Directory />
23+
Require all granted
24+
</Directory>
25+
26+
# Configuration for the AAS Environment
27+
ProxyPass /aas-environment/ http://aas-env:8081/aas-environment/
28+
ProxyPassReverse /aas-environment/ http://aas-env:8081/aas-environment/
29+
30+
# Configuration for the AAS Registry
31+
ProxyPass /aas-registry/ http://aas-registry:8080/aas-registry/
32+
ProxyPassReverse /aas-registry/ http://aas-registry:8080/aas-registry/
33+
34+
# Configuration for the AAS Registry 2
35+
ProxyPass /aas-registry-2/ http://aas-registry-2:8080/aas-registry-2/
36+
ProxyPassReverse /aas-registry-2/ http://aas-registry-2:8080/aas-registry-2/
37+
38+
# Configuration for the Submodel Registry
39+
ProxyPass /sm-registry/ http://sm-registry:8080/sm-registry/
40+
ProxyPassReverse /sm-registry/ http://sm-registry:8080/sm-registry/
41+
42+
# Configuration for the Submodel Registry 2
43+
ProxyPass /sm-registry-2/ http://sm-registry-2:8080/sm-registry-2/
44+
ProxyPassReverse /sm-registry-2/ http://sm-registry-2:8080/sm-registry-2/
45+
46+
# Configuration for the AAS Discovery Service
47+
ProxyPass /aas-discovery/ http://aas-discovery:8081/aas-discovery/
48+
ProxyPassReverse /aas-discovery/ http://aas-discovery:8081/aas-discovery/
49+
50+
# Configuration for the AAS Web UI (aas-gui path)
51+
ProxyPass /aas-gui/ http://aas-web-ui:3000/aas-gui/
52+
ProxyPassReverse /aas-gui/ http://aas-web-ui:3000/aas-gui/
53+
# Remove X-Frame-Options and Content-Security-Policy headers
54+
Header unset X-Frame-Options
55+
Header unset Content-Security-Policy
56+
# Add custom security headers for iframe embedding
57+
Header always set Content-Security-Policy "frame-ancestors 'self' https://demo3.digital-twin.host"
58+
Header always set X-Frame-Options "ALLOW-FROM https://demo3.digital-twin.host"
59+
60+
# Configuration for the SPS Demonstrator UI (root path)
61+
ProxyPass / http://sps-demonstrator-ui:3000/
62+
ProxyPassReverse / http://sps-demonstrator-ui:3000/
63+
</VirtualHost>

examples/BaSyxNGINX/basyx/aas-discovery.properties renamed to examples/BaSyxReverseProxy/basyx/aas-discovery.properties

File renamed without changes.
File renamed without changes.

examples/BaSyxNGINX/docker-compose.yml renamed to examples/BaSyxReverseProxy/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
services:
2-
# nginx
3-
nginx:
4-
image: nginx:alpine
5-
container_name: nginx
2+
# apache
3+
apache:
4+
image: httpd:alpine
5+
container_name: apache
66
ports:
77
- "80:80"
88
volumes:
9-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
9+
- ./apache/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
1010
restart: always
1111
depends_on:
1212
aas-env:

0 commit comments

Comments
 (0)