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.
This commit is contained in:
Hermógenes Oliveira 2020-12-01 21:35:24 -03:00 committed by GitHub
parent 5d5ea264be
commit 680773ef2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -13,16 +13,16 @@
<v-card class="white">
<v-card-text>
<p>
In this <a target="_blank" href="https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-reverse-proxy-websockets-with-apache-2-4/">tutorial</a>, you will learn how to configure Apache Web Server 2.4 to reverse proxy WebSockets.
In this <a target="_blank" href="https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html">document</a>, you will learn how to configure Apache Web Server 2.4 to reverse proxy WebSockets.
</p>
<p>
Example configuration:
Example configuration (where "photoprism" is the name or IP of your server):
</p>
<pre>
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/

View file

@ -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