Welcome! Log In Create A New Profile

Advanced

Set default nginx-conf in sites-enabled?

August 02, 2013 08:38AM
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 {
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 .. :-?
SubjectAuthorPosted

Set default nginx-conf in sites-enabled?

lennartAugust 02, 2013 08:38AM

Re: Set default nginx-conf in sites-enabled?

Francis DalyAugust 02, 2013 08:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 5 on November 26, 2014
Record Number of Guests: 173 on November 26, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready