How do I set a default host for nginx?
- by ulf
I'm trying to figure out how to set a default host for my nginx installation. I found this article in the nginx Wiki:
http://wiki.nginx.org/NginxVirtualHostExample#A_Default_Catchall_Virtual_Host
Unfortunately, this doesn’t work. After restarting I get this:
Restarting nginx: nginx: [emerg] unknown directive "http" in /etc/nginx/sites-enabled/catchall:1
nginx: configuration file /etc/nginx/nginx.conf test failed
After removing the http directive I get this:
Restarting nginx: nginx: [emerg] unknown log format "main" in /etc/nginx/sites-enabled/catchall:7
nginx: configuration file /etc/nginx/nginx.conf test failed
I’m on Ubuntu 10.04.3 where I’m using the official nginx PPA. Version 1.0.9 of nginx is running.