infrastructure/ansible/roles/gateway/files/nginx.conf
Jake Howard a54d373526
Replace edge proxy with nginx
The config makes more sense, and it has more of the features I need, which will come later.
2021-08-22 22:35:09 +01:00

58 lines
1.4 KiB
Nginx Configuration File

worker_processes {{ ansible_processor_nproc }};
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;
}
stream {
log_format access '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
log_format ips '$remote_addr [$time_local] $upstream_addr';
access_log /var/log/nginx/access.log access;
access_log /var/log/nginx/ips.log ips;
server {
listen 80;
proxy_pass {{ wireguard.clients.ingress.ip }}:880;
proxy_protocol on;
}
server {
listen 443;
proxy_pass {{ wireguard.clients.ingress.ip }}:8443;
proxy_protocol on;
}
server {
listen 8448;
proxy_protocol on;
proxy_pass {{ wireguard.clients.ingress.ip }}:8443;
}
}