Add jail for momlaptop.
This commit is contained in:
15
ansible/roles/jail_momlaptop/files/headers.include
Normal file
15
ansible/roles/jail_momlaptop/files/headers.include
Normal file
@@ -0,0 +1,15 @@
|
||||
# Enable HTTP Strict Transport Security (HSTS) to force clients to
|
||||
# always connect via HTTPS (do not use if only testing)
|
||||
add_header Strict-Transport-Security "max-age=31536000;" always;
|
||||
# Enable cross-site filter (XSS) and tell browser to block detected
|
||||
# attacks
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
# Prevent some browsers from MIME-sniffing a response away from the
|
||||
# declared Content-Type
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
# Disallow the site to be rendered within a frame (clickjacking
|
||||
# protection)
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
|
||||
# Indicate that we are serving http3 on port 443
|
||||
add_header Alt-Svc 'h3=":8033"; ma=864000';
|
||||
BIN
ansible/roles/jail_momlaptop/files/htpasswd
Normal file
BIN
ansible/roles/jail_momlaptop/files/htpasswd
Normal file
Binary file not shown.
2
ansible/roles/jail_momlaptop/files/newsyslog.conf
Normal file
2
ansible/roles/jail_momlaptop/files/newsyslog.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
||||
/var/log/nginx/*.log 640 5 1000 @T00 GYC /var/run/nginx.pid SIGUSR1
|
||||
48
ansible/roles/jail_momlaptop/files/nginx.conf
Normal file
48
ansible/roles/jail_momlaptop/files/nginx.conf
Normal file
@@ -0,0 +1,48 @@
|
||||
worker_processes auto;
|
||||
user www www;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
types {
|
||||
text/plain log;
|
||||
}
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
gzip on;
|
||||
|
||||
include conf.d/headers.include;
|
||||
|
||||
server {
|
||||
listen 443 quic reuseport;
|
||||
listen [::]:443 quic reuseport;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
|
||||
server_name momlaptop.fizz.buzz;
|
||||
|
||||
include conf.d/tls_settings.include;
|
||||
# RSA
|
||||
ssl_certificate /momlaptop.fizz.buzz/tls.crt;
|
||||
ssl_certificate_key /momlaptop.fizz.buzz/tls.key;
|
||||
|
||||
# Nginx by default only allows file uploads up to 50M in size
|
||||
client_max_body_size 50M;
|
||||
|
||||
location / {
|
||||
auth_basic "Stuff";
|
||||
auth_basic_user_file conf.d/htpasswd;
|
||||
|
||||
alias /srv/http/;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
ansible/roles/jail_momlaptop/files/nginx_rc.conf
Normal file
1
ansible/roles/jail_momlaptop/files/nginx_rc.conf
Normal file
@@ -0,0 +1 @@
|
||||
nginx_enable="YES"
|
||||
9
ansible/roles/jail_momlaptop/files/proxy.include
Normal file
9
ansible/roles/jail_momlaptop/files/proxy.include
Normal file
@@ -0,0 +1,9 @@
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# Settings for keepalive module for upstreams
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
# Requests sent with early data are subject to replay attacks so the application needs to protect against that by using the Early-Data header.
|
||||
# proxy_set_header Early-Data $ssl_early_data;
|
||||
3
ansible/roles/jail_momlaptop/files/tls_settings.include
Normal file
3
ansible/roles/jail_momlaptop/files/tls_settings.include
Normal file
@@ -0,0 +1,3 @@
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
|
||||
ssl_prefer_server_ciphers on;
|
||||
Reference in New Issue
Block a user