some changes of nginx configuration domains

This commit is contained in:
Artur Kuś 2026-01-02 13:38:59 +01:00
parent 8c00614bdd
commit 0e3694784a
1 changed files with 49 additions and 4 deletions

View File

@ -1,3 +1,42 @@
map $host $redirect_https {
default "";
plecianki.pl https://plecianki.pl;
www.plecianki.pl https://plecianki.pl;
kopama.com.pl https://kopama.com.pl;
www.kopama.com.pl https://kopama.com.pl;
kopana.com.pl https://kopana.com.pl;
www.kopana.com.pl https://kopana.com.pl;
bodypainter.eu https://bodypainter.eu;
www.bodypainter.eu https://bodypainter.eu;
themself.eu https://themself.eu;
www.themself.eu https://themself.eu;
massage.themself.eu https://massage.themself.eu;
artiks.tk https://artiks.tk;
arti24.eu https://arti24.eu;
www.arti24.eu https://arti24.eu;
api.arti24.eu https://api.arti24.eu;
angular.arti24.eu https://angular.arti24.eu;
plecianki.arti24.eu https://plecianki.arti24.eu;
katb.pl https://katb.pl;
www.katb.pl https://katb.pl;
kursy.kopama.pl https://kursy.kopama.pl;
www.kursy.kopama.pl https://kursy.kopama.pl;
statistics.kopama.pl https://statistics.kopama.pl;
www.statistics.kopama.pl https://statistics.kopama.pl;
}
server {
listen 80 default_server;
@ -12,10 +51,16 @@ server {
}
location / {
return 301 https://$host$request_uri;
}
location / {
# Jeśli zmienna $redirect_https NIE jest pusta
if ($redirect_https != "") {
# Przekieruj na HTTPS wersję
return 301 $redirect_https$request_uri;
}
# Dla innych domen - zamknij połączenie (444)
return 444;
}
}