From f059634fe8823ea7df06e01d533ffe10de5d9c39 Mon Sep 17 00:00:00 2001
From: Thibault <54189871+Asaren1070@users.noreply.github.com>
Date: Fri, 20 Jun 2025 08:28:55 +0100
Subject: [PATCH] updating the content of outreach.conf for apache
---
docs/deployment.md | 68 ++++++++++++++++++++++++++++------------------
1 file changed, 42 insertions(+), 26 deletions(-)
diff --git a/docs/deployment.md b/docs/deployment.md
index 788480d..2e4e160 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -106,37 +106,53 @@ Assuming there is an exisiting apache server running on the server, we need to a
```apache
- ServerName hypso.space
- DocumentRoot /var/www/html/outreach
+ ServerName hypso.space
+ DocumentRoot /var/www/html/hypso
- RewriteEngine on
- RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
- RewriteRule ^/(.*)$ https://hypso.space/$1 [L,R=301]
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
+ RewriteRule ^/(.*)$ https://hypso.space/$1 [L,R=301]
+
+
+ Header always set Access-Control-Allow-Origin "https://hypso.space/dataportal"
+ Header always set Access-Control-Allow-Methods "GET, HEAD"
+ Header always set Access-Control-Allow-Headers "Origin, Authorization, X-Requested-With, Content-Type, Accept"
+ Header always set Access-Control-Allow-Credentials "true"
+
+
- ServerName hypso.space
-
- SSLEngine on
- ProxyRequests off
- ProxyPreserveHost On
- SSLCertificateFile "/etc/letsencrypt/live/hypso.space/fullchain.pem"
- SSLCertificateKeyFile "/etc/letsencrypt/live/hypso.space/privkey.pem"
-
-
- ProxyPass http://127.0.0.1:3000/
- ProxyPassReverse http://127.0.0.1:3000/
-
-
-
- ProxyPass http://127.0.0.1:1337
- ProxyPassReverse http://127.0.0.1:1337
- ProxyPreserveHost On
-
- Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
-
+ ServerName hypso.space
+
+ SSLEngine on
+ ProxyRequests off
+ ProxyPreserveHost On
+ SSLCertificateFile "/etc/letsencrypt/live/hypso.space/fullchain.pem"
+ SSLCertificateKeyFile "/etc/letsencrypt/live/hypso.space/privkey.pem"
+
+
+ ProxyPass http://127.0.0.1:3000/
+ ProxyPassReverse http://127.0.0.1:3000/
+ ProxyPreserveHost On
+
+
+
+ ProxyPass http://127.0.0.1:1334/dataportal
+ ProxyPassReverse http://127.0.0.1:1334/dataportal
+ ProxyPreserveHost On
+
+
+
+ ProxyPass http://127.0.0.1:1337
+ ProxyPassReverse http://127.0.0.1:1337
+ ProxyPreserveHost On
+
+
+ Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
+
```
This will redirect all traffic to the https version of the website and proxy the traffic to the correct ports as well as supporting SSL renewal on port 80
@@ -182,4 +198,4 @@ To set up the certificate, follow the instructions on [certbot](https://certbot.
1. Follow the guide [here](https://www.ntnu.no/wiki/display/ntnuitubuntu/Semi-managed+Linux+servers) to install the nessecary software packages. These should include `certbot`, `python3-certbot-apache` or `python3-certbot-nginx` depending on the server setup.
2. Run `sudo certbot certonly --apache` to generate the certificate.
-3. Make sure the certificate is set up correctly in the apache configuration file.
\ No newline at end of file
+3. Make sure the certificate is set up correctly in the apache configuration file.