ڵλǣվȺϵͳ > ѧϰ¼ > -> IIS7.0 Appcmd

11515藏宝阁开奖资料990990

ʱ䣺2018-04-21 14:13

IIS7.0 Appcmd

     ϻ˵ȻýװʱDZزٵģʹNSISװϸоһAppcmdνǹȫ.

    ЩϣЩʹ󲿷ֶתصı˵ġЩĽܣܶûܵ(֪Dz)

    ΢ Դ Ҳϸ:

    ַhttp://technet.microsoft.com/zh-cn/library/cc772200(WS.10).aspx(һ飡ûҵҪ)

     

    ΢ Դ еҾͲˣ㿪Լȥ

    õһЩĿǰֻsite IJapppool config app vdir ʱڼ룩


     

     

һ׼

    APPcmd.exe λ C:\Windows\System32\inetsrv Ŀ¼

    ʹ Cd c:\Windows\System32\inetsrv лĿ¼


     

     

:

    IIS й߻ʽ:

APPCMD () ()

    ֵ֧Ķ:

    SITE      վĹ
APP       Ӧó
VDIR      Ŀ¼
APPPOOL   Ӧó
CONFIG    ý
WP       
REQUEST   HTTP
MODULE    ģ
BACKUP    ñ
TRACE     ʹʧ־

     -----------Ͳͺϸ,˶֪IISIJΡ

     


     

     

Site

1.

    վĹ

    APPCMD

    ֵ֧:

    list      гվ
set       վ
add       վ
delete    ɾվ
start     վ
stop      ֹͣվ

2.

гվ

APPCMD list SITE [ʶ] [-1:ֵ1 ...]

    гϵվ㡣ʹضվıʶ url Ҹվ㣬
ָվƥվ㡣

    ʾ:

     appcmd list sites

        гϵվ㡣

     appcmd list site "Default Web Site"

        վ㡰Default Web Site

     appcmd list site http://localhost/app1

        ָ url վ㡣

     appcmd list site /serverAutoStart:false

        ҡserverAutoStartΪfalseվ㡣

վ

APPCMD add SITE [ʶ] [-1:ֵ1 ...]

    ʹָôµվ㡣٣ṩվƺ ID

    ֵ֧IJ:

     /name () վ

     /id վ ID

     /bindings http://domain:port,...üǸʽprotocol/bindingInformation,...ԭʼʽİб

     /physicalPath

    ָΪվ㴴ָָ·ĸĿ¼ĸӦó
ԣһûиӦóվ㣬ҸվڴӦó֮ǰ޷


ʾ:

     appcmd add site /name:"My New Site" /id:2 /bindings:http://www.domain.com:80

        ʹָĺüǰ󶨴һվ㡰ҵվ㡱Աڶ˿ 80  www.d
omain.com http

     appcmd add site /name:"My New Site" /id:2 /bindings:http://*:81

        ʹָĺüǰ󶨴һվ㡰ҵվ㡱Աڶ˿ 81 κ
http

     appcmd add site /name:"My New Site" /id:2 /bindings:http/*:81:

        ʹָ ID Ͱ󶨴վ㡰ҵվ㡱վвκӦ

     appcmd add site /name:"My New Site" /id:2 /bindings:http/*:81: /physicalPath:"c
:\inetpub\mynewsite"

        ʹָ ID Ͱ󶨴վ㡰ҵվ㡱ϵͳԶĿ¼ָָ
·ĸӦó

     appcmd add site /name:"My New Site" /bindings:http/*:81:

        ʹð󶨴վ㡰ҵվ㡱Զվ ID󣬸վ㲻
κӦó

     

վ

APPCMD set SITE [ʶ] [-1:ֵ1 ...]

    ָվԡṩ׼ȷվʶұ뽫ñʶΪ
վ㡣

    ֵ֧IJ:

     identifier ()

        Ҫ޸ĵվվƻ url

     /site.name

        Ҫ޸ĵվվƻ url (ʶͬ)

     /bindings

        http://domain:port,...üǸʽprotocol/bindingInformation,...ԭʼ
ʽİб


ʾ:

     appcmd set site "Default Web Site" /serverAutoStart:false /id:100

        áDefault Web SiteվġserverAutoStart͡idԡ

  set һЩ߼(Ҫ)

    ʱ appcmd set site "Default Web Site"  ʱú߼

    ͺ............

    -name
-id IDʶ
-serverAutoStart ǷԶ
-bindings.[protocol='string',bindingInformation='string'].p
-bindings.[protocol='string',bindingInformation='string'].b
-limits.maxBandwidth
-limits.maxConnections
-limits.connectionTimeout
-logFile.logExtFileFlags
-logFile.customLogPluginClsid
-logFile.logFormat
-logFile.directory
-logFile.period
-logFile.truncateSize
-logFile.localTimeRollover
-logFile.enabled
-traceFailedRequestsLogging.enabled
-traceFailedRequestsLogging.directory
-traceFailedRequestsLogging.maxLogFiles
-traceFailedRequestsLogging.maxLogFileSizeKB
-traceFailedRequestsLogging.customActionsEnabled
-applicationDefaults.path
-applicationDefaults.applicationPool
-applicationDefaults.enabledProtocols
-virtualDirectoryDefaults.path 
-virtualDirectoryDefaults.physicalPath վ·
-virtualDirectoryDefaults.userName  ·ƾݵ˻
-virtualDirectoryDefaults.password  ·ƾݵ
-virtualDirectoryDefaults.logonMethod 
-virtualDirectoryDefaults.allowSubDirConfig 
-[path='string'].path
-[path='string'].applicationPool
-[path='string'].enabledProtocols
-[path='string'].virtualDirectoryDefaults.path
-[path='string'].virtualDirectoryDefaults.physicalPath
-[path='string'].virtualDirectoryDefaults.userName
-[path='string'].virtualDirectoryDefaults.password
-[path='string'].virtualDirectoryDefaults.logonMethod
-[path='string'].virtualDirectoryDefaults.allowSubDirConfig
-[path='string'].[path='string'].path
-[path='string'].[path='string'].physicalPath
-[path='string'].[path='string'].userName
-[path='string'].[path='string'].password
-[path='string'].[path='string'].logonMethod
-[path='string'].[path='string'].allowSubDirConfig
 

ɾվ

    APPCMD delete SITE [ʶ] [-1:ֵ1 ...]

    : Ӽɾָվ㡣ṩ׼ȷվʶұ뽫ñʶΪվ㡣

    ֵ֧IJ:

     identifier    ()Ҫɾվվƻ url

     /site.name   Ҫɾվվƻ url (ʶͬ)


ʾ:

     appcmd delete site "Default Web Site"           ɾվ㡰Default Web Site

     

վ

    APPCMD start SITE [ʶ] [-1:ֵ1 ...]

    ָվ㲢øվ㣬Կʼа󶨶˵ϵ󡣱ṩ׼ȷվʶұ뽫ñʶΪվ㡣

    ֵ֧IJ:

     identifier    ()Ҫվվƻ url

     /site.name    Ҫվվƻ url (ʶͬ)


ʾ:

     appcmd start site "Default Web Site"

        վ㡰Default Web Site

     

ֹͣվ

    APPCMD stop SITE [ʶ] [-1:ֵ1 ...]

    ָֹͣվ㣬ֹ󶨶˵Ͻ󡣱ṩ׼ȷվʶ
뽫ñʶΪվ㡣

    ֵ֧IJ:

     identifier    ()Ҫֹͣվվƻ url

     /site.name    Ҫֹͣվվƻ url (ʶͬ)


ʾ:

     appcmd stop site "Default Web Site"

        ֹͣվ㡰Default Web Site

     

    д....ϣԴ..

    иõϣעһ·ο