File tree Expand file tree Collapse file tree 2 files changed +52
-5
lines changed Expand file tree Collapse file tree 2 files changed +52
-5
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2016-2025 Friedrich von Never <[email protected] > 2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ user www-data;
6+ worker_processes auto;
7+ pid /run/nginx.pid ;
8+ error_log /var/log/nginx/error.log;
9+
10+ events {
11+ worker_connections 768 ;
12+ }
13+
14+ http {
15+ sendfile on;
16+ tcp_nopush on;
17+ tcp_nodelay on;
18+ keepalive_timeout 60 ;
19+ types_hash_max_size 2048 ;
20+
21+ include /etc/nginx/mime.types ;
22+ default_type application/octet-stream ;
23+
24+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
25+ ssl_prefer_server_ciphers on;
26+
27+ gzip on;
28+
29+ include /etc/nginx/conf.d/*.conf;
30+ }
Original file line number Diff line number Diff line change 66- name : Install and configure Nginx
77 hosts : xmpp2
88 become : true
9+
10+ handlers :
11+ - name : Reload nginx
12+ ansible.builtin.service :
13+ name : nginx
14+ state : reloaded
15+
916 tasks :
1017 - name : Update apt cache
1118 ansible.builtin.apt :
1724 name : nginx
1825 state : present
1926
20- - name : Start and enable nginx service
21- ansible.builtin.service :
22- name : nginx
23- state : started
24- enabled : true
27+ - name : Remove the *-enabled and *-available directories
28+ ansible.builtin.file :
29+ path : " /etc/nginx/{{ item }}"
30+ state : absent
31+ loop :
32+ - modules-available
33+ - modules-enabled
34+ - sites-available
35+ - sites-enabled
36+
37+ - name : Set up the main nginx configuration file
38+ ansible.builtin.copy :
39+ src : nginx/nginx.conf
40+ dest : /etc/nginx/nginx.conf
41+ notify : Reload nginx
You can’t perform that action at this time.
0 commit comments