Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

chaks/nginx/redirect_eu_vistor #3480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions default.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
map $http_cf_ipcountry $redirect_country {
default no;
IT yes;
DE yes;
FR yes;
LU yes;
GR yes;
ES yes;
SK yes;
LT yes;
NL yes;
AT yes;
BG yes;
SI yes;
CY yes;
BE yes;
RO yes;
HR yes;
PT yes;
PL yes;
LV yes;
EE yes;
CZ yes;
FI yes;
HU yes;
DK yes;
SE yes;
IE yes;
GB yes;
MT yes;
}

server {
listen 80;
server_name localhost;
server_name _;

if ($redirect_country = yes ) {
return 301 https://binary.com/move-to-deriv/;
}

add_header Cache-Control "public, max-age=7200, s-maxage=600, must-revalidate";
charset UTF-8;
Expand All @@ -11,7 +47,9 @@ server {
return 503;
}

location ~ /\.git {
location ~ /\. {
access_log off;
log_not_found off;
return 404;
}

Expand Down