From e7f347c330b6d785b49df742b134273f4a33b2fb Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Fri, 25 Jan 2019 06:21:51 +0000 Subject: [PATCH] Adds redirection for feed URLs --- nginx-conf/site.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nginx-conf/site.conf b/nginx-conf/site.conf index f1c9d59..892bcfb 100644 --- a/nginx-conf/site.conf +++ b/nginx-conf/site.conf @@ -11,6 +11,16 @@ server { proxy_set_header X-Real-IP $remote_addr; # pass on real client IP + location /feed.xml { + return 301 https://$host/feed.atom; + } + + rewrite ^/tags/(.*)/feed.xml$ /tags/$1/feed.atom permanent; + + location ~ .(aspx|php|jsp|cgi)$ { + deny all; + } + location / { proxy_pass http://site:3000; } @@ -27,3 +37,11 @@ server { server_name abhinavsarkar.net; return 301 https://$host$request_uri; } + +# remove 'www' +server { + listen 80; + listen 443 ssl; + server_name www.abhinavsarkar.net; + return 301 https://abhinavsarkar.net$request_uri; +}