+ php-composer install own playbook with version downgrade for oldest php 7.4
* automatic detect php version and set php extension (for =>8 php version without installing gd, because Debian 11 need libgd3 fix for that) * mapping tld hostname for non-www redirection moved to conf.d and copy that file to remote machine with others existing map-files * some features in this commit not to be a tested in real environment
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
map $host $tld {
|
||||
default $host;
|
||||
'~^www\.(?<domain>.*)$' $domain;
|
||||
}
|
@ -6,11 +6,6 @@ if ( $http_host ~* "^www\.") {
|
||||
if ( $nonwww ~* "^0+$" ) {
|
||||
return 418;
|
||||
}
|
||||
# TODO: map need moved to conf.d
|
||||
map $host $tld {
|
||||
default $host;
|
||||
'~^www\.(?<domain>.*)$' $domain;
|
||||
}
|
||||
location @nonwww {
|
||||
rewrite ^ https://$tld$request_uri permanent;
|
||||
}
|
||||
|
@ -77,6 +77,12 @@
|
||||
dest: /etc/nginx/
|
||||
mode: 0644
|
||||
|
||||
- name: Copy map config for www/non-www redirects
|
||||
copy:
|
||||
src: etc/nginx/conf.d/map_tld_domain.conf
|
||||
dest: /etc/nginx/conf.d/
|
||||
mode: 0644
|
||||
|
||||
post_tasks:
|
||||
- name: Default index.html
|
||||
template:
|
||||
|
Reference in New Issue
Block a user