How to set nginx to access xxx.com equal to xxx.com/html/web, and keep the domain name unchanged?
When you visit xxx.com, you actually visit xxx.com/html/web
The url of the browser is still xxx.com
Is this possible?
How to configure
Thanks for the advice~~
为情所困2017-05-16 17:26:26
If it is a static or cgi website, it may be better to use try_files.
root /path/to/root;
index index.html index.html index.php;
location / {
try_files /html/web/$uri /html/web/$uri/ $uri $uri/ =404;
}