How can I copy/clone a site on iis7

后端 未结 4 1705
时光取名叫无心
时光取名叫无心 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
    2021-02-05 00:24

    Actually the answer above - editing the ApplicationHost.config is only half off the job. You will also need to add the new AppPools to the applicationPools node.

    Therefore :

    1/. As others have mentioned first make a copy of your ApplicationHost.config file !! I usually copy and rename as "ApplicationHost_BACKUP_YYYY_MM_DD.config"

    2/. Using Notepad (best option for Windows to mitigate issues with 32 bit vs 64 bit). Search for the site to be copied looking for (in my case) 'id="13"'. Once you find the site you want to copy. Copy the entire node and paste it after the site node copied. Assign it a new ID. Be sure to check sites in IIS for all used IDs first !! Also be sure to give it a new NAME and update all PATHS and APPPOOLS in the copied section. See example below.

    SITE TO COPY (CURRENT) :

    
         
             
                       
         
              
         
    
    

    COPIED SITE (NEW) :

    
      
          
                   
     
         
     
    
    

    3/. Add new Apppools to the applicationPools node as configured in your copied site above i.e. below I have copied the "Reading List" apppool and renamed the copy "Reading List 2"

    
        
             
        
        
        
        
     
    

    If all is well, view site in IIS and restart if need be :-)

    Hope that helps someone.

    Richard Hetherington

提交回复
热议问题