From 6fc83d6fd9f0e23af9aa2336028768b39ec4fe7e Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Mon, 26 Nov 2018 14:51:09 +0100 Subject: [PATCH] Add apache example --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index fae9e6ec..41100217 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,17 @@ location /socket.io { } ``` +#### Sample Apache proxy config + +``` +RewriteCond %{REQUEST_URI} ^/socket.io [NC] +RewriteCond %{QUERY_STRING} transport=websocket [NC] +RewriteRule /(.*) ws://localhost:6001/$1 [P,L] + +ProxyPass /socket.io http://localhost:6001/socket.io +ProxyPassReverse /socket.io http://localhost:6001/socket.io +``` + ### Setting the working directory The working directory in which `laravel-echo-server` will look for the configuration file `laravel-echo-server.json` can be passed to the `start` command through the `--dir` parameter like so: `laravel-echo-server start --dir=/var/www/html/example.com/configuration`