How can I copy/clone a site on iis7

后端 未结 4 1701
时光取名叫无心
时光取名叫无心 2021-02-05 00:04

I want to make a dev, demo1, demo2 copy of the iis website I\'m working on. I need each iis to run off its own code base, but the settings will be almost identical. Is there an

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 00:22

    Go to C:\Windows\system32\inetsrv\config Make a copy of ApplicationHost.config file. It's and XML file. Open it and go to ('configuration\system.applicationHost\sites') find the site that you want to get duplicated (It will have same name as in IIS Management studio) then copy that site section and paste it below inside then assign new site section new id and name attributes that have not been used yet name="Test1" id="5".

     
                    
                        
                    
                    
                        
                    
                    
                        
                    
                    
                        
                    
                    
                        
                    
                
    

    would get cloned to.

    
                
                    
                
                
                    
                
                
                    
                
                
                    
                
                
                    
                
            
    

    Go to IIS Management studio and if you did everything right there will be new web site that is stopped.

    enter image description here
    If it fails use backup copy to overwrite ApplicationHost.config.

    UPDATE: As per comments if you are using 64bit environment when editing ApplicationHost.config you want to use 64bit editor in Admin mode, Notepad is one.

    Taken from here

    Hope this saves you some time.

提交回复
热议问题