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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -