Unify nginx configuration
This creates a simple base configuration skeleton, that other configuration can be easily loaded into.
This commit is contained in:
@ -1,29 +1,12 @@
|
||||
worker_processes auto;
|
||||
# Block requests which don't have an explicit handler
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
server_name _;
|
||||
access_log off;
|
||||
return 418;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
gzip on;
|
||||
|
||||
# Block requests which don't have an explicit handler
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
access_log off;
|
||||
return 418;
|
||||
}
|
||||
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
# Load configuration files for the default server block (this directory is used by dokku).
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
@ -1,5 +1,5 @@
|
||||
- name: restart nginx
|
||||
- name: reload nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
state: reloaded
|
||||
become: true
|
||||
|
@ -43,13 +43,12 @@
|
||||
domains: d.theorangeone.net
|
||||
become: true
|
||||
|
||||
- name: Install custom nginx config
|
||||
- name: Install nginx config
|
||||
template:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
validate: nginx -t -c %s
|
||||
dest: /etc/nginx/http.d/dokku.conf
|
||||
mode: "644"
|
||||
notify: restart nginx
|
||||
notify: reload nginx
|
||||
become: true
|
||||
|
||||
# https://dokku.com/docs/advanced-usage/backup-recovery/
|
||||
@ -61,3 +60,4 @@
|
||||
user: root
|
||||
job: rsync --archive --progress -h /var/lib/dokku/{config,data,services} /home/dokku --exclude '/home/dokku/**/cache/*' /mnt/tank/app-data/dokku/
|
||||
cron_file: dokku-data-sync
|
||||
become: true
|
||||
|
Reference in New Issue
Block a user