Set default nginx-conf in sites-enabled?

2013-08-02 Thread lennart
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 {

Re: Redirect www to no-www with variable (for multiple domains)?

2013-07-08 Thread lennart
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

Re: Redirect www to no-www with variable (for multiple domains)?

2013-07-07 Thread lennart
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:

Redirect www to no-www with variable (for multiple domains)?

2013-07-07 Thread lennart
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