diff --git a/roles/deploy-web/files/gouter b/roles/deploy-web/files/gouter index 6654857..1564fa8 100644 --- a/roles/deploy-web/files/gouter +++ b/roles/deploy-web/files/gouter @@ -62,71 +62,43 @@ server { #proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-Proto $scheme; - sub_filter 'gouters.canalblog.com' 'clarissariviere.com'; + sub_filter 'gouters.canalblog.com' "$host"; sub_filter_once off; } - # pass PHP scripts to FastCGI server - # - #location ~ \.php$ { - # include snippets/fastcgi-php.conf; - # - # # With php-fpm (or other unix sockets): - # fastcgi_pass unix:/run/php/php7.3-fpm.sock; - # # With php-cgi (or other tcp sockets): - # fastcgi_pass 127.0.0.1:9000; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - - listen 443 ssl; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/gouters.valczeryba.ovh/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/gouters.valczeryba.ovh/privkey.pem; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/clarissariviere.com/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/clarissariviere.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot - - - } - -# Virtual Host configuration for example.com -# -# You can move that to a different file under sites-available/ and symlink that -# to sites-enabled/ to enable it. -# -#server { -# listen 80; -# listen [::]:80; -# -# server_name example.com; -# -# root /var/www/example.com; -# index index.html; -# -# location / { -# try_files $uri $uri/ =404; -# } -#} - server { - if ($host = gouters.valczeryba.ovh) { + if ($host = www.clarissariviere.fr) { return 301 https://$host$request_uri; } # managed by Certbot + if ($host = www.clarissariviere.com) { + return 301 https://$host$request_uri; + } # managed by Certbot - server_name gouters.valczeryba.ovh; - listen 80; + + if ($host = clarissariviere.fr) { + return 301 https://$host$request_uri; + } # managed by Certbot + + + if ($host = clarissariviere.com) { + return 301 https://$host$request_uri; + } # managed by Certbot + + + server_name clarissariviere.com clarissariviere.fr www.clarissariviere.fr www.clarissariviere.com; + + listen 80; return 404; # managed by Certbot - }