I want to make my nginx to show a web page for this subdomain: abc.xyz.com and a different web page for this subdomain: abcd.xyz.com. How can I make that?
I tried to change the location block but it didn't work. Please help me.
I want to make my nginx to show a web page for this subdomain: abc.xyz.com and a different web page for this subdomain: abcd.xyz.com. How can I make that?
I tried to change the location block but it didn't work. Please help me.
You should list both domains in server_name directive:
server {
server_name abcd.xyz.com abc.xyz.com;
location /page {
}
location /anothe_page {
}
}
Or create two different servers as follow:
server {
server_name abc.xyz.com;
location /page {
}
}
server {
server_name abcd.xyz.com;
location /anothe_page {
}
}