mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
27 lines
898 B
Plaintext
27 lines
898 B
Plaintext
<% server_name = ENV.fetch("SERVER_NAME") { "_default_" } %>
|
|
<% unless server_name == "_default_" %>
|
|
<VirtualHost *:80>
|
|
ServerName _default_
|
|
DocumentRoot /var/www/html
|
|
</VirtualHost>
|
|
<% end %>
|
|
|
|
<VirtualHost *:80>
|
|
ServerName <%= server_name %>
|
|
DocumentRoot <%= ENV.fetch("APP_PATH") %>/public
|
|
|
|
ProxyRequests off
|
|
ProxyPreserveHost On
|
|
|
|
<% 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 %>/
|
|
</Location>
|
|
|
|
<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>
|
|
</VirtualHost>
|