Dowemo

When we've finished writing the project, it's easy to deploy the project to deploy.


location/demo {


 root E:/;


 index index.html index.htm;


}






There's a problem with this configuration, only http://localhost/demo/.
If you want to visit the other interface in the question, such as http://localhost/demo/page1, you won't find the page.
I don't have a problem at development time, which can be accessed, as you would have to do with node to project. No, I might not be able to configure it.
Finally found the way, in the other people 's nginx. Config, the extra line of stuff.


location/demo {


 root E:/;


 #加上了这个,就可以在url后面直接加路由上配置path了。


 try_files $uri/demo/index.html;


 index index.html index.htm;


}






It isn't clear, but the function is implemented.

Mark it for later use.




Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs