You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-07-31 19:44:30 +03:00
Docker: allow configuration of HTTP listen port via env var (#28840)
* Docker: allow configuration of HTTP listen port via env var * Update docs/install.md Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * prettier --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
bd3e93e8dd
commit
703149d76d
27
docker/nginx-templates/default.conf.template
Normal file
27
docker/nginx-templates/default.conf.template
Normal file
@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen ${ELEMENT_WEB_PORT};
|
||||
listen [::]:${ELEMENT_WEB_PORT};
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Set no-cache for the version, config and index.html
|
||||
# so that browsers always check for a new copy of Element Web.
|
||||
# NB http://your-domain/ and http://your-domain/? are also covered by this
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
location = /version {
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
# covers config.json and config.hostname.json requests as it is prefix.
|
||||
location /config {
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
}
|
||||
|
Reference in New Issue
Block a user