Você está fazendo errado.
server {
listen 80;
server_name www.mysite.com;
return 301 http://mysite.com$request_uri;
}
server {
listen 80 default_server;
server_name mysite.com;
access_log /var/www/mysite.com/logs/access.log;
error_log /var/www/mysite.com/logs/error.log;
root /var/www/mysite.com/htdocs;
error_page 404 /404.html;
location / {
try_files $uri $uri/index.html =404;
}
location = /index.html {
return 301 http://mysite.com/;
}
}