I've several config-files in sites-enabled, all working fine. However, if a
domain (foobar2.com) not is mentioned in a config, NGINX takes the conf-file
of foobar1.com. How can i overrule this and make some sort of catch-all?
With the line in the default-config i get an error 500:
server {
Edho Arief Wrote:
---
> On Sun, Jul 7, 2013 at 6:30 PM, lennart wrote:
> >
> > Is there a way to do this with regex or variables? I've ~15 domains
> and it
> > would be more convenient to have only one entry "to
Jonathan Matthews Wrote:
---
> On 7 Jul 2013 10:30, "lennart" wrote:
> >
> > According to http://wiki.nginx.org/Pitfalls#Server_Name this is the
> best
> > solution to redirect www to no-www for one domain:
According to http://wiki.nginx.org/Pitfalls#Server_Name this is the best
solution to redirect www to no-www for one domain:
server {
server_name www.domain.com;
return 301 $scheme://domain.com$request_uri;
}
server {
server_name domain.com;
[...]
}
Is there a way to do this with regex or