NGINX: Subdomain to subdirectory without redirection NGINX: Subdomain to subdirectory without redirection nginx nginx

NGINX: Subdomain to subdirectory without redirection


Try something like this:

server {  server_name abc.example.com;  location / {     proxy_pass http://example/abc/;     proxy_set_header Host "example.com";  }  location /api {     proxy_pass http://example;     proxy_set_header Host "example.com";  }  location /css {     proxy_pass http://example;     proxy_set_header Host "example.com";  }}