You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
This image is based on the official **[Nginx](https://hub.docker.com/_/nginx)** Docker image and extends it with the ability to have **virtual hosts created automatically**, as well as **adding SSL certificates** when creating new directories. For that to work, it integrates two tools that will take care about the whole process: **[watcherd](https://github.com/devilbox/watcherd)** and **[vhost-gen](https://github.com/devilbox/vhost-gen)**.
19
19
20
-
From a users perspective, you mount your local project directory into the container under `/shared/httpd`. Any directory then created in your local project directory wil spawn a new virtual host by the same name. Each virtual host optionally supports a generic or custom backend configuration (**static files**, **PHP-FPM** or **reverse proxy**).
20
+
From a users perspective, you mount your local project directory into the container under `/shared/httpd`. Any directory then created in your local project directory wil spawn a new virtual host by the same name. Each virtual host optionally supports a generic or custom backend configuration: **static files**, **PHP-FPM**, **reverse proxy** (with or without **websocket** support)..
21
21
22
22
**HTTP/2 is enabled by default for all SSL connections.**
23
23
@@ -100,7 +100,7 @@ Below is a brief overview about most outstanding features, but I would still adv
100
100
* PHP is not included in the provided images, but you can enable a remote backend and link it to a PHP-FPM image. This allows you to easily switch PHP versions and choose one which is currently required.
101
101
102
102
#### Automated Reverse Proxy setup
103
-
* In reverse proxy mode, you can choose any http or https backend of your likings. This way you can proxy NodeJS, Python, etc. and use the webserver to add SSL in front.
103
+
* In reverse proxy mode, you can choose any http or https backend of your likings. This way you can proxy NodeJS, Python, etc. and use the webserver to add SSL in front. It distinguishes between HTTP backends (`http://`, `https://`) and Websocket backends (`ws://`, `wss://`) automatically and configures accordingly.
104
104
105
105
#### Automated SSL certificate generation
106
106
* SSL certificates are generated automatically for each virtual host if you choose to enable it
@@ -246,6 +246,7 @@ The given examples distinguish between two different kinds of setup: The default
246
246
💡 <ahref="doc/examples.md#-serve-php-files-with-php-fpm-and-sync-local-permissions" >Sync local filestem permission</a><br/>
247
247
💡 <ahref="doc/examples.md#-serve-php-files-with-php-fpm-over-https" >Serve PHP files over HTTPS</a><br/>
Copy file name to clipboardexpand all lines: doc/environment-variables.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -349,7 +349,7 @@ The given value determines the backend (potentia remote/reveres hosts) for the m
349
349
***Var type:**`string`
350
350
***Requires:**`MAIN_VHOST_ENABLE=1`
351
351
352
-
You can configure a remote backend via this environment variable. Either a remote PHP-FPM server or any kind of service via `http`or `https` reverse proxy.
352
+
You can configure a remote backend via this environment variable. Either a remote PHP-FPM server or any kind of service via `http`, `https`, `ws`, or `wss` reverse proxy (where `ws` and `wss` are for websocket backends).
353
353
354
354
### String format
355
355
@@ -369,7 +369,7 @@ The backend environment variable supports two different formats.
369
369
With the direct configuration you set everything explicitly via this environment variable and nothing else is required.
Copy file name to clipboardexpand all lines: doc/examples.md
+86-2
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,9 @@
14
14
3.[Serve PHP files with PHP-FPM and sync local permissions](#-serve-php-files-with-php-fpm-and-sync-local-permissions)
15
15
4.[Serve PHP files with PHP-FPM over HTTPS](#-serve-php-files-with-php-fpm-over-https)
16
16
5.[Act as a Reverse Proxy for NodeJS](#-act-as-a-reverse-proxy-for-nodejs)
17
-
6.[Fully functional LEMP stack with Mass vhosts](#-fully-functional-lemp-stack-with-mass-vhosts)
18
-
7.[Docker Compose](#-docker-compose)
17
+
6.[Act as a Reverse Proxy for Websocket](#-act-as-a-reverse-proxy-for-websocket)
18
+
7.[Fully functional LEMP stack with Mass vhosts](#-fully-functional-lemp-stack-with-mass-vhosts)
19
+
8.[Docker Compose](#-docker-compose)
19
20
20
21
21
22
@@ -237,6 +238,89 @@ The following example proxies all HTTP requests to a NodeJS remote backend. You
237
238
238
239
239
240
241
+
## 💡 Act as a Reverse Proxy for Websocket
242
+
243
+
The following example proxies all HTTP requests to a Websocket remote backend. You could also enable SSL on the webserver in order to access the websocket backend via HTTPS.
Where `<procotol>` can by one of `http` or `https` (depending what your backend provides. `<server-addr>` and `<serer-port>` specify the hostname, IPv4 or IPv6 address of your upstream server, followed by its TCP port.
97
+
Where `<procotol>` can by one of `http`, `https`, `ws` or `wss` (depending what your backend provides. `<server-addr>` and `<serer-port>` specify the hostname, IPv4 or IPv6 address of your upstream server, followed by its TCP port.
98
+
99
+
**Note:** When specifying `ws` or `wss`, the webserver will automatically be configured to be capable of communicating with web sockets.
0 commit comments