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:
parent
5d5ea264be
commit
680773ef2c
|
@ -13,16 +13,16 @@
|
||||||
<v-card class="white">
|
<v-card class="white">
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<p>
|
<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>
|
||||||
<p>
|
<p>
|
||||||
Example configuration:
|
Example configuration (where "photoprism" is the name or IP of your server):
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond ${HTTP:Upgrade} websocket [NC]
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
RewriteCond ${HTTP:Connection} upgrade [NC]
|
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||||
RewriteRule .* "ws:/photoprism:2342/$1" [P,L]
|
RewriteRule ^/?(.*) "ws://photoprism:2342/$1" [P,L]
|
||||||
|
|
||||||
ProxyPass / http://photoprism:2342/
|
ProxyPass / http://photoprism:2342/
|
||||||
ProxyPassReverse / http://photoprism:2342/
|
ProxyPassReverse / http://photoprism:2342/
|
||||||
|
|
|
@ -22,7 +22,7 @@ if [[ $OS == "Windows_NT" ]]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PHOTOPRISM_OS=`uname -s`
|
PHOTOPRISM_OS=`uname -s`
|
||||||
PHOTOPRISM_ARCH=`uname -p`
|
PHOTOPRISM_ARCH=`uname -m`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "debug" ]]; then
|
if [[ $1 == "debug" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue