2021-09-04 22:41:30 +01:00
|
|
|
worker_processes auto;
|
2021-08-22 22:34:27 +01:00
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
http {
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
#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 logs/access.log main;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
#tcp_nopush on;
|
|
|
|
|
|
|
|
#keepalive_timeout 0;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
#gzip on;
|
|
|
|
|
2021-08-23 16:12:34 +01:00
|
|
|
server_tokens off;
|
|
|
|
|
2021-08-23 16:10:37 +01:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name _;
|
|
|
|
return 308 https://$host$request_uri;
|
|
|
|
}
|
2021-08-22 22:34:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stream {
|
|
|
|
|
|
|
|
log_format access '$remote_addr [$time_local] '
|
|
|
|
'$protocol $status $bytes_sent $bytes_received '
|
2022-01-19 09:00:20 +00:00
|
|
|
'$session_time "$ssl_preread_server_name" '
|
2021-08-22 22:34:27 +01:00
|
|
|
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
|
|
|
|
|
2022-01-19 09:00:20 +00:00
|
|
|
log_format ips '$remote_addr [$time_local] $ssl_preread_server_name';
|
2021-08-22 22:34:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
access_log /var/log/nginx/access.log access;
|
|
|
|
access_log /var/log/nginx/ips.log ips;
|
|
|
|
|
2022-01-19 09:00:20 +00:00
|
|
|
ssl_preread on;
|
|
|
|
|
2021-08-22 22:34:27 +01:00
|
|
|
server {
|
|
|
|
listen 443;
|
|
|
|
listen 8448;
|
|
|
|
proxy_pass {{ wireguard.clients.ingress.ip }}:8443;
|
2021-08-24 14:31:12 +01:00
|
|
|
proxy_protocol on;
|
2021-08-22 22:34:27 +01:00
|
|
|
}
|
|
|
|
}
|