I have some static html files under:
/var/www/project1
Nginx config for this project is:
server_name www.project1.com project1.com;
root /var/www/project1;
location / {
index index.html;
}
My goal is to use nginx so that when a user enters this url:
www.project1.com/project2
Nginx uses another root, I have tried:
location /project2 {
root /var/www/project2;
index index.html;
}
But this is not working. Any idea on how to achieve this?