imabe listens on 80 // log-files are linked to stdout
This commit is contained in:
parent
0d5d10d64c
commit
8b2e14277a
3 changed files with 10 additions and 9 deletions
|
@ -9,7 +9,7 @@ data:
|
||||||
nginx.conf: |
|
nginx.conf: |
|
||||||
user nginx;
|
user nginx;
|
||||||
worker_processes 3;
|
worker_processes 3;
|
||||||
error_log stdout info;
|
error_log /var/log/nginx/error.log; info;
|
||||||
pid /var/log/nginx/nginx.pid;
|
pid /var/log/nginx/nginx.pid;
|
||||||
worker_rlimit_nofile 8192;
|
worker_rlimit_nofile 8192;
|
||||||
events {
|
events {
|
||||||
|
@ -21,7 +21,7 @@ data:
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] $status'
|
log_format main '$remote_addr - $remote_user [$time_local] $status'
|
||||||
'"$request" $body_bytes_sent "$http_referer"'
|
'"$request" $body_bytes_sent "$http_referer"'
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
access_log stdout main;
|
access_log /var/log/nginx/access.log; main;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
@ -80,8 +80,8 @@ data:
|
||||||
}
|
}
|
||||||
website.conf: |
|
website.conf: |
|
||||||
server {
|
server {
|
||||||
listen 8080 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:8080 default_server;
|
listen [::]:80 default_server;
|
||||||
server_name FQDN
|
server_name FQDN
|
||||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
|
|
@ -22,13 +22,14 @@ spec:
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 80
|
||||||
|
command: [ "/bin/bash", "-c", "nginx -g 'daemon off;'" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /etc/nginx
|
- mountPath: /etc/nginx
|
||||||
readOnly: true
|
readOnly: true
|
||||||
name: etc-nginx
|
name: etc-nginx
|
||||||
- mountPath: /var/log/nginx
|
- mountPath: /tmp
|
||||||
name: log
|
name: tmp
|
||||||
- mountPath: /var/www/html/website
|
- mountPath: /var/www/html/website
|
||||||
name: content-volume
|
name: content-volume
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -63,7 +64,7 @@ spec:
|
||||||
path: conf.d/website.conf
|
path: conf.d/website.conf
|
||||||
- key: mime.types
|
- key: mime.types
|
||||||
path: mime.types
|
path: mime.types
|
||||||
- name: log
|
- name: tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: content-volume
|
- name: content-volume
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
|
|
@ -11,4 +11,4 @@ spec:
|
||||||
app: nginx
|
app: nginx
|
||||||
ports:
|
ports:
|
||||||
- name: nginx-http
|
- name: nginx-http
|
||||||
port: 8080
|
port: 80
|
||||||
|
|
Loading…
Reference in a new issue