nginx how to serve 'admin' subdomain request fro a specific root folder? -
is possible serve requests example.com ( , www.example.co) root folder
location / { root html; index index.html index.htm; }
but requests admin.example.com folder 'admin' on same server ?
the admin.example.com
should configured separate server
in nginx config, noone restricts pointing root inside other server's root directory
server { listen 80; server_name admin.example.com; root /some/path/example.com/admin; location / { index index.html; } } server { listen 80; server_name www.example.com example.com; root /some/path/example.com; location / { index index.html index.htm; } }
Comments
Post a Comment