You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
# ToDo:
|
|
# content-pfad für nginx server definieren
|
|
# sinnvolle security policies konfigurieren
|
|
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: nginx-env
|
|
namespace: default
|
|
data:
|
|
nginx.conv: |
|
|
user nginx;
|
|
worker_processes 3;
|
|
error_log /var/log/nginx/error.log;
|
|
events {
|
|
worker_connections 10240;
|
|
}
|
|
http {
|
|
log_format main
|
|
'remote_addr:$remote_addr\t'
|
|
'time_local:$time_local\t'
|
|
'method:$request_method\t'
|
|
'uri:$request_uri\t'
|
|
'host:$host\t'
|
|
'status:$status\t'
|
|
'bytes_sent:$body_bytes_sent\t'
|
|
'referer:$http_referer\t'
|
|
'useragent:$http_user_agent\t'
|
|
'forwardedfor:$http_x_forwarded_for\t'
|
|
'request_time:$request_time';
|
|
access_log /var/log/nginx/access.log main;
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
location / {
|
|
root html;
|
|
index index.html index.htm;
|
|
}
|
|
}
|
|
include /etc/nginx/virtualhost/virtualhost.conf;
|
|
}
|
|
virtualhost.conf: |
|
|
upstream app {
|
|
server localhost:8080;
|
|
keepalive 1024;
|
|
}
|
|
server {
|
|
listen 80 default_server;
|
|
root /usr/local/app;
|
|
access_log /var/log/nginx/app.access_log main;
|
|
error_log /var/log/nginx/app.error_log;
|
|
location / {
|
|
proxy_pass http://app/;
|
|
proxy_http_version 1.1;
|
|
}
|
|
}
|