Hello,
I have multiple subdomains and would like to specify error_page locations only once, and have all the subdomains use this, instead of inserting each error_page into the individual server blocks. Does this make sense?
[code]
server
{
server_name *.foo.com;
location = /core.css
{
root /users/name/core;
}
error_page 403 /403.html;
location = /403.html
{
root /users/name/core.error;
}
}
[/code]
I would expect the *.foo.com to catch all the requests for the error_page, so that www.foo.com, webmail.foo.com, dev.foo.com etc would all return the same error_page. But they all return a 404 instead of following the wildcard. Is it not possible to accomplish this, or am I doing something wrong?
I also tried this, but it didn't work either. I do not fully understand using "_" though to be honest.
[code]
server_name _;
[/code]
Thanks for any pointers. Let me know if I need to explain this better.