将Azure webroot指向不同的文件夹
我已经在Azure上build立了一个NodeJS网站,不断从github部署。 不幸的是,我的github项目的结构是根不是网站。
github_root |_ app(nodejs website) | |_ docs | |_ blah
看来Azure(IIS)正在寻找github_root中的server.js。
有没有办法将IIS指向网站的“应用程序”文件夹?
使用IIS服务器部署在Windows Azure上的Node.js应用程序使用iisnode
– 允许托pipenode.js应用程序的本机IIS模块。
你可以指定哪个文件是你的主要应用程序文件在web.config
例如
<configuration> <system.webServer> <!-- // configure your node.js application file here --> <handlers> <add name="iisnode" path="your_application_file.js" verb="*" modules="iisnode" /> </handlers> <!-- ... // other configuration parameters .... --> <system.webServer> <configuration>
您可以在Tomasz Janczuk( iisnode creator) 博客上find更多示例(包括URL重写等)。
我希望这会帮助或给你正确的方向。