Squashed commit of the following: commit 3c4abbe69605caff2a39efafd90550d93e9e1447 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 15:56:41 2021 +0200 Updated npm scripts and built/serve shell commit 00525a666fb6b3146ea5f85c7c3ad741378401de Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 13:59:12 2021 +0200 Updated nginx-conf commit a9945c14cc93eebf8812c075fe8ca67e39ab8ae8 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 12:59:49 2021 +0200 Added elastics serverUrl to environment files and fixed nginx-conf commit 38872cea957ce54c5cb496890e4be88fb019be58 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 12:49:41 2021 +0200 Added Elastic APM with error handling commit d3db5e8703e3b0a1d0d0b24230dc52a64bee252c Merge: a3bc70e9d139f750Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 12:22:16 2021 +0200 Merge branch 'develop' into feature/TV-316-RUM commit a3bc70e9420dc5d309325cfcf1221c6760d18c38 Merge: 3f98a66bc2a02dbaAuthor: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Oct 4 09:07:11 2021 +0200 Merge branch 'develop' into feature/TV-316-RUM commit 3f98a66bfda3af315c5417e2d2902ab80877b98b Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Fri Oct 1 16:05:43 2021 +0200 Added @elastic/apm-rum-angular to log errors and api-requests
87 lines
2.5 KiB
Plaintext
87 lines
2.5 KiB
Plaintext
# For more information on configuration, see:
|
|
# * Official English Documentation: http://nginx.org/en/docs/
|
|
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
|
|
|
|
|
worker_processes auto;
|
|
error_log /var/opt/rh/rh-nginx116/log/nginx/error.log;
|
|
pid /var/opt/rh/rh-nginx116/run/nginx/nginx.pid;
|
|
|
|
# Load dynamic modules. See /opt/rh/rh-nginx116/root/usr/share/doc/README.dynamic.
|
|
include /opt/rh/rh-nginx116/root/usr/share/nginx/modules/*.conf;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/opt/rh/rh-nginx116/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
|
|
gzip on;
|
|
gzip_types application/xml application/json text/css text/javascript application/javascript;
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 500;
|
|
|
|
include /etc/opt/rh/rh-nginx116/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
|
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
|
# for more information.
|
|
include /opt/app-root/etc/nginx.d/*.conf;
|
|
|
|
server {
|
|
listen 8080 default_server;
|
|
listen [::]:8080 default_server;
|
|
server_name _;
|
|
root /opt/app-root/src;
|
|
|
|
# Avoid server error because of large request headers
|
|
large_client_header_buffers 4 16k;
|
|
|
|
# Load configuration files for the default server block.
|
|
include /opt/app-root/etc/nginx.default.d/*.conf;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
expires -1;
|
|
}
|
|
|
|
location ~* \.(?:jpg|jpeg|gif|png|ico|woff2)$ {
|
|
expires 1M;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
location ~* \.(?:js|json|css)$ {
|
|
add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate";
|
|
}
|
|
|
|
# Elastic Logging
|
|
location /logging/ {
|
|
proxy_pass $ELASTIC_SERVER_URL;
|
|
}
|
|
|
|
|
|
error_page 404 /404.html;
|
|
location = /40x.html {
|
|
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
|
|
}
|
|
}
|
|
}
|