Hello
I am new to nginx. Please help me to set up following configuration
The root folder for site.com is /var/www(root /var/www)
But when somebody open http://site.com I want to load contents from /var/www/home
If somebody try http://site.com/anything I want to load contents from /var/www/anything
I tried following
root /var/www;
location = / {
root /var/www/home
}
didn't work
Also tried
location = / {
root /var/www/home
}
location / {
root /var/www
}
didn't work
Please help
I am new to nginx. Please help me to set up following configuration
The root folder for site.com is /var/www(root /var/www)
But when somebody open http://site.com I want to load contents from /var/www/home
If somebody try http://site.com/anything I want to load contents from /var/www/anything
I tried following
root /var/www;
location = / {
root /var/www/home
}
didn't work
Also tried
location = / {
root /var/www/home
}
location / {
root /var/www
}
didn't work
Please help