Unify nginx configuration
This creates a simple base configuration skeleton, that other configuration can be easily loaded into.
This commit is contained in:
@ -1,28 +1,11 @@
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
gzip off;
|
||||
gzip_static off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /mnt/downloads;
|
||||
|
||||
root /mnt/downloads;
|
||||
|
||||
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
- name: restart nginx
|
||||
- name: reload nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
state: reloaded
|
||||
become: true
|
||||
|
||||
- name: restart qbittorrent
|
||||
|
@ -1,18 +1,7 @@
|
||||
- name: Install nginx
|
||||
package:
|
||||
name: nginx
|
||||
become: true
|
||||
|
||||
- name: Enable nginx
|
||||
service:
|
||||
name: nginx
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: Nginx config
|
||||
template:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
mode: "0600"
|
||||
dest: /etc/nginx/http.d/downloads.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: restart nginx
|
||||
notify: reload nginx
|
||||
|
Reference in New Issue
Block a user