Serving static content from a sub url?


I have a static website on my machine at

I simply want to serve that from a sub url on my domain:

How do I do that?

I tried this but it didn’t work…

server {
listen 80;
location /mysite {
index index.html;
root /home/me/www/public;

Thanks for the help.

Posted at Nginx Forum:,12645,12645#msg-12645

try this:

  • root /home/me/www/public;
  • alias /home/me/www/public;

Posted at Nginx Forum:,12645,12647#msg-12647

That worked! Thank you.

Posted at Nginx Forum:,12645,12650#msg-12650