禁止目录下制定拓展名的文件的外网访问:

location ~ ^.*/themes/(.*.html)?$ {deny all;}