Browse Source

.net, .com to .org redirect

pull/16/head
Matīss Treinis 4 years ago
parent
commit
6798624cec
No known key found for this signature in database GPG Key ID: 9123B913EBF53D43
  1. 17
      ansible/roles/website/files/nginx.conf.d/almalinux.org.conf
  2. 1
      ansible/roles/website/tasks/website.yml

17
ansible/roles/website/files/nginx.conf.d/almalinux.org.conf

@ -118,11 +118,11 @@ server {
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
}
# HTTP redirect
# HTTP to HTTPS redirect
server {
listen 80;
listen [::]:80;
server_name almalinux.org www.almalinux.org staging.almalinux.org;
server_name almalinux.org www.almalinux.org staging.almalinux.org almalinux.net almalinux.com;
# ACME-challenge
location ^~ /.well-known/acme-challenge/ {
@ -136,4 +136,17 @@ server {
}
}
# Redirect for .net and .com
server {
server_name almalinux.net almalinux.com;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# SSL
ssl_certificate /etc/ssl/almalinux.com.cert.pem;
ssl_certificate_key /etc/ssl/almalinux.com.key.pem;
location / {
return 301 https://almalinux.org$request_uri;
}
}

1
ansible/roles/website/tasks/website.yml

@ -81,3 +81,4 @@
copy: src='nginx.conf.d/almalinux.org.conf' dest='/etc/nginx/conf.d/almalinux.org.conf' mode='0644' owner=root group=root
notify: [ 'Reload NGINX' ]
become: yes
tags: [ 'www_conf' ]

Loading…
Cancel
Save