Update index.md (#297)
Added Apache reverse proxy example configuration
This commit is contained in:
parent
ce73bc58e5
commit
75435be949
|
@ -90,5 +90,29 @@ OPTIONS
|
|||
}
|
||||
```
|
||||
|
||||
### Apache Reverse Proxy
|
||||
Example of https virtualhost configuration for Apache as a reverse proxy. Please also pass --allow-http on code-server startup to allow the proxy to connect.
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName code.example.com
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
||||
RewriteRule /(.*) ws://localhost:8443/$1 [P,L]
|
||||
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
|
||||
RewriteRule /(.*) http://localhost:8443/$1 [P,L]
|
||||
|
||||
ProxyRequests off
|
||||
|
||||
RequestHeader set X-Forwarded-Proto https
|
||||
RequestHeader set X-Forwarded-Port 443
|
||||
|
||||
ProxyPass / http://localhost:8443/ nocanon
|
||||
ProxyPassReverse / http://localhost:8443/
|
||||
|
||||
</VirtualHost>
|
||||
```
|
||||
*Important:* For more details about Apache reverse proxy configuration checkout the [documentation](https://httpd.apache.org/docs/current/mod/mod_proxy.html) - especially the [Securing your Server](https://httpd.apache.org/docs/current/mod/mod_proxy.html#access) section
|
||||
|
||||
### Help
|
||||
Use `code-server -h` or `code-server --help` to view the usage for the cli. This is also shown at the beginning of this section.
|
||||
|
|
Loading…
Reference in New Issue