Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh: Allow default vhost path override #245

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: []

Expand Down
2 changes: 1 addition & 1 deletion vars/AlmaLinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion vars/Archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 3 additions & 1 deletion vars/FreeBSD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ 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"
2 changes: 1 addition & 1 deletion vars/OpenBSD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion vars/Rocky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"