Set default nginx-conf in sites-enabled?

lennart nginx-forum at
Fri Aug 2 12:38:28 UTC 2013

I've several config-files in sites-enabled, all working fine. However, if a
domain ( not is mentioned in a config, NGINX takes the conf-file
of 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 {
    listen 80 default_server;
    server_name _; # This is just an invalid value which will never trigger
on a real hostname.

     server_name_in_redirect off;
     root  /home/user/www/park;
            location / {
                # This is cool because no php is touched for static content
                try_files $uri $uri/ /index.html;

Help .. :-?

Posted at Nginx Forum:,241479,241479#msg-241479

More information about the nginx mailing list