mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 22:01:35 +01:00
fix: cleanup templates
This commit is contained in:
Binary file not shown.
68
templates/nginx.conf.j2
Normal file
68
templates/nginx.conf.j2
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
user www-data;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
log_format custom '$remote_user [$time_local]'
|
||||||
|
'"$request" $status $body_bytes_sent'
|
||||||
|
'"$http_referer" "$http_user_agent"'
|
||||||
|
'"$request_time" "$upstream_connect_time"';
|
||||||
|
access_log /var/log/nginx/access.log custom;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
ssl_certificate {{ ssl_path }}/fullchain.pem;
|
||||||
|
ssl_certificate_key {{ ssl_path }}/privkey.pem;
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_ciphers {{ ssl_ciphers }};
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
|
||||||
|
proxy_cache_path /tmp/nginx.cache.d keys_zone=default_proxy_cache:10m;
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
|
include http_include.conf;
|
||||||
|
|
||||||
|
server{
|
||||||
|
listen 80 default;
|
||||||
|
listen [::]:80 default;
|
||||||
|
|
||||||
|
# disable logging
|
||||||
|
access_log off;
|
||||||
|
|
||||||
|
include locations/acme-challenge.conf;
|
||||||
|
location /{
|
||||||
|
return 302 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stream {
|
||||||
|
|
||||||
|
ssl_certificate {{ ssl_path}}/fullchain.pem;
|
||||||
|
ssl_certificate_key {{ ssl_path }}/privkey.pem;
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_ciphers {{ ssl_ciphers }};
|
||||||
|
|
||||||
|
include stream_include.conf;
|
||||||
|
}
|
||||||
@@ -5,11 +5,12 @@ server{
|
|||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
listen [::]:443 ssl;
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
{% if servernames %}
|
{% if servernames %}server_name{% for s in servernames %} {{ s }}{% endfor %};{% endif %}
|
||||||
server_name {% for s in servernames %} {{ s }} {% endfor %};
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
include locations/acme-challenge.conf;
|
include acme-challenge.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
proxy_pass http://{{ targetip }}:{{ targetport }};
|
proxy_pass http://{{ targetip }}:{{ targetport }};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
server {
|
server {
|
||||||
|
|
||||||
# {{ comment }}
|
# {{ comment }}
|
||||||
|
|
||||||
listen {{ portstring }} {% if udp %} udp {% endif %}{% if ssl %} ssl {% endif %};
|
listen {{ portstring }} {% if udp %} udp {% endif %}{% if ssl %} ssl {% endif %};
|
||||||
proxy_pass {{ targetip }}:$server_port;
|
|
||||||
{% if transparent %} proxy_bind $remote_addr transparent; {% endif }
|
|
||||||
proxy_timeout 10s;
|
proxy_timeout 10s;
|
||||||
proxy_responses 1;
|
proxy_responses 1;
|
||||||
|
proxy_pass {{ targetip }}:$server_port;
|
||||||
|
|
||||||
|
{% if transparent %} proxy_bind $remote_addr transparent; {% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user