Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
vaadin:mod_proxy [2020/06/04 18:22] admin |
vaadin:mod_proxy [2023/04/17 06:21] (current) admin |
||
---|---|---|---|
Line 5: | Line 5: | ||
We'll show you a simple configuration option for Apache http server with mod_proxy: | We'll show you a simple configuration option for Apache http server with mod_proxy: | ||
- | Assume the application is avaiable under http://localhost:8080/webapp/web/ui/ | + | Assume the application is available under http://localhost:8080/webapp/web/ui/ |
In order to use an Apache http server in front of Apache Tomcat, simple add following to the config file of Apache http server: | In order to use an Apache http server in front of Apache Tomcat, simple add following to the config file of Apache http server: | ||
Line 41: | Line 41: | ||
ProxyPassReverse / http://localhost:8080/webapp/web/ui timeout=300 | ProxyPassReverse / http://localhost:8080/webapp/web/ui timeout=300 | ||
</file> | </file> | ||
+ | |||
+ | If above configuration is too complex or websockets don't work, just use this: | ||
+ | |||
+ | <file html> | ||
+ | <Location /dri17/> | ||
+ | ProxyPass http://localhost:8080/driprotocol/ | ||
+ | ProxyPassReverse /driprotocol | ||
+ | ProxyPassReverseCookiePath "/driprotocol/" "/dri17/" | ||
+ | |||
+ | RewriteEngine on | ||
+ | RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] | ||
+ | RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC] | ||
+ | RewriteRule (.*)/driprotocol/(.*) ws://localhost:8080/driprotocol/$2 [P] | ||
+ | </Location> | ||
+ | </file> | ||
+ | This configuration will map the external address ''https://www.mydom.ain/dri17/'' to the internal host: ''http://localhost:8080/driprotocol/'' |