Skip to main content

Nginx

Nginx is used as the reverse proxy for the UHS, this is what makes our services addressible via subdomains in the browser and enables SSL. This servive is required for UHS to function.

Configuration

See the Nginx Configuration page for more information on how to configure Nginx.

More Information

In UHS, the Nginx configuration file is stored in files/nginx.conf and contains helm templating. Each service has an entry in the Nginx config that that will be conditionally loaded based on the values passed in the secrets.yaml file.

An example of an Nginx config entry for the UHS service is below:

{{- if .Values.services.homepage.enabled }}
server {
server_name homepage.{{ .Values.services.nginx.domain }};
include ssl.conf;
location / {
proxy_pass http://homepage:{{ .Values.services.homepage.ports.http }};
include nginx_proxy_headers.conf;
}
}
{{- end }}

The line server_name also dictates the subdomain that will be used for the service. You can change it here if you wish.