From ba3b82dcd72c37ffd37b046b84fc5cd800003d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20de=20Ferri=C3=A8res?= Date: Thu, 23 Nov 2023 19:20:10 +0100 Subject: [PATCH] enh: Allow default vhost path override --- README.md | 2 +- vars/AlmaLinux.yml | 2 +- vars/Archlinux.yml | 2 +- vars/Debian.yml | 2 +- vars/FreeBSD.yml | 2 +- vars/OpenBSD.yml | 2 +- vars/RedHat.yml | 2 +- vars/Rocky.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 08dfeef..9e4aa80 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ An example of a secondary vhost which will redirect to the one shown above. nginx_remove_default_vhost: false -Whether to remove the 'default' virtualhost configuration supplied by Nginx. Useful if you want the base `/` URL to be directed at one of your own virtual hosts configured in a separate .conf file. +Whether to remove the 'default' virtualhost configuration supplied by Nginx. Useful if you want the base `/` URL to be directed at one of your own virtual hosts configured in a separate .conf file. You can optionnaly set `nginx_override_default_vhost_path` if the default vhost file determined by distribution name is not the correct one (for example: since nginx 1.24 Debian package from nginx repository, vhost default file supplied is '/etc/nginx/conf.d/default.conf' instead of '/etc/nginx/sites-enabled/default' previously). nginx_upstreams: [] diff --git a/vars/AlmaLinux.yml b/vars/AlmaLinux.yml index 0138f8d..b25f592 100644 --- a/vars/AlmaLinux.yml +++ b/vars/AlmaLinux.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /var/run/nginx.pid nginx_vhost_path: /etc/nginx/conf.d -nginx_default_vhost_path: /etc/nginx/conf.d/default.conf +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/conf.d/default.conf') }}" __nginx_user: "nginx" diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml index 593e100..66a25c0 100644 --- a/vars/Archlinux.yml +++ b/vars/Archlinux.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /run/nginx.pid nginx_vhost_path: /etc/nginx/sites-enabled -nginx_default_vhost_path: /etc/nginx/sites-enabled/default +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/sites-enabled/default') }}" __nginx_user: "http" diff --git a/vars/Debian.yml b/vars/Debian.yml index cb12770..d73e6ca 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /run/nginx.pid nginx_vhost_path: /etc/nginx/sites-enabled -nginx_default_vhost_path: /etc/nginx/sites-enabled/default +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/sites-enabled/default') }}" __nginx_user: "www-data" diff --git a/vars/FreeBSD.yml b/vars/FreeBSD.yml index b032f98..c3838ba 100644 --- a/vars/FreeBSD.yml +++ b/vars/FreeBSD.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /usr/local/etc/nginx/nginx.conf nginx_mime_file_path: /usr/local/etc/nginx/mime.types nginx_pidfile: /var/run/nginx.pid nginx_vhost_path: /usr/local/etc/nginx/sites-enabled -nginx_default_vhost_path: /usr/local/etc/nginx/sites-enabled/default +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/usr/local/etc/nginx/sites-enabled/default') }}" __nginx_user: "www" diff --git a/vars/OpenBSD.yml b/vars/OpenBSD.yml index a5a5c9d..ae260ab 100644 --- a/vars/OpenBSD.yml +++ b/vars/OpenBSD.yml @@ -5,6 +5,6 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /var/run/nginx.pid nginx_vhost_path: /etc/nginx/sites-enabled -nginx_default_vhost_path: /etc/nginx/sites-enabled/default +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/sites-enabled/default') }}" nginx_package_name: "nginx--" __nginx_user: "www" diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 0138f8d..b25f592 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /var/run/nginx.pid nginx_vhost_path: /etc/nginx/conf.d -nginx_default_vhost_path: /etc/nginx/conf.d/default.conf +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/conf.d/default.conf') }}" __nginx_user: "nginx" diff --git a/vars/Rocky.yml b/vars/Rocky.yml index 0138f8d..b25f592 100644 --- a/vars/Rocky.yml +++ b/vars/Rocky.yml @@ -5,5 +5,5 @@ nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types nginx_pidfile: /var/run/nginx.pid nginx_vhost_path: /etc/nginx/conf.d -nginx_default_vhost_path: /etc/nginx/conf.d/default.conf +nginx_default_vhost_path: "{{ nginx_override_default_vhost_path | default('/etc/nginx/conf.d/default.conf') }}" __nginx_user: "nginx"