Use nginx to serve static files from subdirectories of a given directory
I have several sets of static .html files on my server, and I would like use nginx to serve them directly. For example, nginx should serve an URI of the following pattern: www.mysite.com/public/doc/foo/bar.html with the .html file that is located at /home/www-data/mysite/public/doc/foo/bar.html . You can think of foo as the set name, and bar as the file name here. I wonder whether the following piece of nginx config would do the job: server { listen 8080; server_name www.mysite.com mysite.com; error_log /home/www-data/logs/nginx_www.error.log; error_page 404 /404.html; location /public/doc/ {