https://mysite.com/yabloki/$requvest_uri -> https://yabloki.mysite.com/
location /yabloki/ {
rewrite ^/yabloki/(.*) http://yabloki.mysite.com/$1 permanent;
return 403;
}
server {
listen 80;
server_name example.com;
location ~ ^/products/(.*)$ {
proxy_pass http://catalog.example.com/$1;
}
}
server {
# ...
server_name domain.tld www.domain.tld;
return 301 $scheme://subdomain.domain.tld$request_uri;
}
server {
server_name subdomain.domain.tld;
# ...
}