2025-02-06 17:24:51 +01:00
|
|
|
<% server_name = ENV.fetch("SERVER_NAME") { "_default_" } %>
|
2021-07-20 10:35:19 +02:00
|
|
|
<% unless server_name == "_default_" %>
|
2017-09-19 13:31:31 +02:00
|
|
|
<VirtualHost *:80>
|
2021-07-20 10:35:19 +02:00
|
|
|
ServerName _default_
|
|
|
|
|
DocumentRoot /var/www/html
|
|
|
|
|
</VirtualHost>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<VirtualHost *:80>
|
|
|
|
|
ServerName <%= server_name %>
|
2025-02-06 17:24:51 +01:00
|
|
|
DocumentRoot <%= ENV.fetch("APP_PATH") %>/public
|
2017-09-19 13:31:31 +02:00
|
|
|
|
|
|
|
|
ProxyRequests off
|
2020-01-30 14:51:25 +00:00
|
|
|
ProxyPreserveHost On
|
2017-09-19 13:31:31 +02:00
|
|
|
|
2020-01-31 16:10:09 +00:00
|
|
|
<% location = ENV.fetch("OPENPROJECT_RAILS__RELATIVE__URL__ROOT", "").chomp("/") %>
|
|
|
|
|
<Location <%= location == "" ? "/" : location %>>
|
|
|
|
|
ProxyPass http://<%= ENV.fetch("APP_HOST", "127.0.0.1") %>:8080<%= location %>/ retry=0
|
|
|
|
|
ProxyPassReverse http://<%= ENV.fetch("APP_HOST", "127.0.0.1") %>:8080<%= location %>/
|
2017-09-19 13:31:31 +02:00
|
|
|
</Location>
|
2026-01-13 17:37:59 +00:00
|
|
|
|
|
|
|
|
<Location /hocuspocus>
|
|
|
|
|
ProxyPass http://<%= ENV.fetch("APP_HOST", "127.0.0.1") %>:1234/ upgrade=websocket
|
|
|
|
|
ProxyPassReverse http://<%= ENV.fetch("APP_HOST", "127.0.0.1") %>:1234/
|
|
|
|
|
</Location>
|
2017-09-19 13:31:31 +02:00
|
|
|
</VirtualHost>
|