這個文件在默認安裝IIS Express後應該是在「文檔》IISExpress》config」目錄下。web
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.applicationHost> </system.applicationHost> </configuration>
大致上和web.config文件很像,都是XML,並且configuration爲根標籤。這裏咱們關注system.applicationHost標籤。express
這裏配置IIS Express 要管理的站點信息。網絡
<system.applicationHost> <sites> <site name="sitename" id="123456789"> <application path="/"> <virtualDirectory path="/" physicalPath="F:\PHP\websiteroot" /> </application> <bindings> <binding protocol="http" bindingInformation="*:12345:localhost" /> <binding protocol="http" bindingInformation="*:12345:127.0.0.1" /> <binding protocol="https" bindingInformation="*:44301:localhost" /> </bindings> </site> </sites> </system.applicationHost>
sites在system.applicationHost標籤下,子標籤site是咱們本身的站點設置,name是站點名,這樣之後能夠用命令行:app
iisexpress /site:sitename
來啓動指定站點。spa
application的配置也是一目瞭然,就是配置站點的虛擬路徑和物理路徑。命令行
bindings裏每一個binding綁定一個URL,protocol是網絡協議,bindingInformation裏兩個冒號(:)中間的是端口號,後面的是本機IP地址。能夠binding多個,上面的例子就binding了3個。code