From 680773ef2cdf8eafa9123af1624c5aa87d0ad6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=B3genes=20Oliveira?= Date: Tue, 1 Dec 2020 21:35:24 -0300 Subject: [PATCH] Fix example configuration for Apache 2.4 (#573) * Fix example configuration for Apache 2.4 The tutorial on serverlab.ca contains some errors. The official docs are accurate and more helpful. Added reminder for the benefit of people mindlessly copying and pasting. * Portability fix for scripts/build.sh As per the manual, the `-p` flag to `uname` is not portable and results in `unknown` in many cases, for instance, when compiling on a Raspberry Pi 4. --- frontend/src/pages/help/websockets.vue | 10 +++++----- scripts/build.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/help/websockets.vue b/frontend/src/pages/help/websockets.vue index fee426af9..aa759ca8e 100644 --- a/frontend/src/pages/help/websockets.vue +++ b/frontend/src/pages/help/websockets.vue @@ -13,16 +13,16 @@

- In this tutorial, you will learn how to configure Apache Web Server 2.4 to reverse proxy WebSockets. + In this document, you will learn how to configure Apache Web Server 2.4 to reverse proxy WebSockets.

- Example configuration: + Example configuration (where "photoprism" is the name or IP of your server):

 RewriteEngine on
-RewriteCond ${HTTP:Upgrade} websocket [NC]
-RewriteCond ${HTTP:Connection} upgrade [NC]
-RewriteRule .* "ws:/photoprism:2342/$1" [P,L]
+RewriteCond %{HTTP:Upgrade} websocket [NC]
+RewriteCond %{HTTP:Connection} upgrade [NC]
+RewriteRule ^/?(.*) "ws://photoprism:2342/$1" [P,L]
 
 ProxyPass / http://photoprism:2342/
 ProxyPassReverse / http://photoprism:2342/
diff --git a/scripts/build.sh b/scripts/build.sh
index 91c88bd15..bc8bb918a 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -22,7 +22,7 @@ if [[ $OS == "Windows_NT" ]]; then
     fi
 else
     PHOTOPRISM_OS=`uname -s`
-    PHOTOPRISM_ARCH=`uname -p`
+    PHOTOPRISM_ARCH=`uname -m`
 fi
 
 if [[ $1 == "debug" ]]; then