From 4cf78ddb0b2115ba473215ac88ac9d84e55d46e5 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Wed, 20 Mar 2024 16:09:20 +0100 Subject: [PATCH] Added reverseproxy script --- server/reverseproxy | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server/reverseproxy diff --git a/server/reverseproxy b/server/reverseproxy new file mode 100644 index 0000000..567d696 --- /dev/null +++ b/server/reverseproxy @@ -0,0 +1,20 @@ + + ProxyPreserveHost On + DocumentRoot /home/pi/www/html/ + + + # Enable proxying WebSockets + ProxyPass /ws ws://localhost:8001/ + ProxyPassReverse /ws ws://localhost:8001/ + # Enable proxying HTTP + ProxyPass /http http://localhost:8080/ + + ProxyPass /putData http://localhost:5000/putData + ProxyPassReverse /putData http://localhost:5000/putData + ProxyPass /flask http://localhost:5000/ + ProxyPassReverse /flask http://localhost:5000/ + ProxyPreserveHost On + # Logging + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + \ No newline at end of file