feat: added new server token

This commit is contained in:
sujiba 2025-01-05 01:08:19 +01:00
parent e9809d5857
commit c6db4b1a17
2 changed files with 6 additions and 3 deletions

View file

@ -2,7 +2,9 @@
# tasks file for nginx
- name: Install nginx
ansible.builtin.apt:
name: nginx
name:
- nginx
- libnginx-mod-http-headers-more-filter
state: present
notify: Start and enable nginx
@ -11,7 +13,7 @@
path: /etc/nginx/sites-enabled/default
state: absent
- name: Comment ssl_protocols out in nginx.conf, is defined in security.conf
- name: Comment out ssl_protocols in nginx.conf, it is defined in security.conf
ansible.builtin.replace:
path: /etc/nginx/nginx.conf
regexp: '^(\s*ssl_protocols)'
@ -23,7 +25,7 @@
regexp: '^(\s*ssl_protocols)'
replace: '#\1'
- name: Comment ssl_prefer_server_ciphers out in nginx.conf, is defined in security.conf
- name: Comment out ssl_prefer_server_ciphers in nginx.conf, it is defined in security.conf
ansible.builtin.replace:
path: /etc/nginx/nginx.conf
regexp: '^(\s*ssl_prefer_server_ciphers)'

View file

@ -8,3 +8,4 @@ limit_req_zone $binary_remote_addr zone=conn_limit:10m rate=5r/s;
# extras
server_tokens off;
more_set_headers 'Server: UwU';