I'm trying to set up a simple virtual host, serving only static files. Trouble is, directing the browser to (in this case) jorum.dev
displays the default nginx welcome page, as opposed to jorum.dev/index.html
.
Nginx was installed using Homebrew on Mac OS X Mountain Lion.
hosts
127.0.0.1 jorum.dev
jorum.dev
server {
listen 80;
server_name jorum.dev;
location / {
root ~/Sites/jorum;
index index.html index.htm;
}
}
nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
gzip on;
gzip_disable "msie6";
gzip_min_length 1100;
gzip_vary on;
gzip_proxied any;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/x-font-ttf font/opentype application/vnd.ms-fontobject;
server_tokens off;
client_max_body_size 4096k;
client_header_timeout 10;
client_body_timeout 10;
keepalive_timeout 10 10;
send_timeout 10;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
/usr/local/etc/nginx/sites-available/jorum.dev
, symlinked to/usr/local/etc/nginx/sites-enabled/jorum.dev
.