Is this possible? I would like to have a server block using multiple server names.
For example:
server {
server_name hostname1.domain.com;
server_name hostname2.domain.com;
rewrite ^(.*) http://$server_name;
root /www/document/root;
}
If the user goes to http://hostname1.domain.com/blah, I would like the rewrite rule to go to http://hostname1.domain.com and serve the page at /www/document/root. Same scenario for http://hostname2.domain.com/blah -- I would like for the rewrite rule to go to http://hostname2.domain.com and serve the document root.
Thank you!