Just skip the "server_name example.com;" bit.
You don't need the rewrite server for IP address based server.
server {
listen 80;
root /path/to/your/document/root/;
access_log /path/to/where/you/want/to/keep/your/access.log;
error_log //path/to/where/you/want/to/keep/your/error.log;
location /example/ {
index index.html;
....
}
location / {
index index.html;
....
}
}