功能:

創(chuàng)建網(wǎng)站刪除網(wǎng)站創(chuàng)建綁定刪除綁定將證書(shū)分配給 IIS 綁定。從 IIS 綁定中刪除證書(shū)。創(chuàng)建 IIS 應(yīng)用程序池。刪除 IIS 應(yīng)用程序" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁(yè) > 營(yíng)銷資訊 > 網(wǎng)站運(yùn)營(yíng) > saltstack模塊之win_iis(iis站點(diǎn)管理)

saltstack模塊之win_iis(iis站點(diǎn)管理)

時(shí)間:2023-07-28 15:15:02 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)

時(shí)間:2023-07-28 15:15:02 來(lái)源:網(wǎng)站運(yùn)營(yíng)

saltstack模塊之win_iis(iis站點(diǎn)管理):#! https://zhuanlan.zhihu.com/p/538189864

功能:

1. 創(chuàng)建網(wǎng)站

確人網(wǎng)站已部署,不會(huì)修改已有配置項(xiàng)

此函數(shù)僅針對(duì)站點(diǎn)名稱進(jìn)行驗(yàn)證,甚至?xí)祷?True如果該站點(diǎn)已經(jīng)存在并具有不同的配置。不會(huì)修改現(xiàn)有站點(diǎn)的配置。

:param str name: The IIS site name. IIS 站點(diǎn)名稱。 :param str sourcepath: The physical path of the IIS site. IIS 站點(diǎn)的物理路徑。 :param str apppool: The name of the IIS application pool. IIS 應(yīng)用程序池的名稱。 :param str hostheader: The host header of the binding. 綁定的主機(jī)頭。 :param str ipaddress: The IP address of the binding. 綁定的 IP 地址。 :param str port: The TCP port of the binding. 綁定的 TCP 端口。 :param str protocol: The application protocol of the binding. 綁定的應(yīng)用協(xié)議。
如果指定了應(yīng)用程序池,并且該應(yīng)用程序池尚不存在,它將被創(chuàng)建。

1.1. 用法示例:

1.1.1. 僅具有所需參數(shù)的。

這將默認(rèn)使用默認(rèn)應(yīng)用程序池assigned by IIS:

site0-deployed: win_iis.deployed: - name: site0 - sourcepath: C://inetpub//site0

1.1.2. 指定所有可用參數(shù)的用法示例:

site0-deployed: win_iis.deployed: - name: site0 - sourcepath: C://inetpub//site0 - apppool: site0 - hostheader: site0.local - ipaddress: '*' - port: 443 - protocol: https

從 IIS 中刪除網(wǎng)站。

參數(shù):

:param str name:IIS 站點(diǎn)名稱。

示例:

defaultwebsite-remove: win_iis.remove_site: - name: Default Web Site

2. 創(chuàng)建 IIS 綁定。

此函數(shù)僅針對(duì)綁定 ipaddress:port:hostheader 組合進(jìn)行驗(yàn)證,即使綁定已經(jīng)存在不同的配置,也會(huì)返回 True 。它不會(huì)修改現(xiàn)有綁定的配置。

2.1. 參數(shù)

:site:IIS 站點(diǎn)名稱。 :hostheader:綁定的主機(jī)頭。 :ipaddress:綁定的IP地址。 :port:綁定的 TCP 端口。 :protocol:綁定的應(yīng)用協(xié)議。 :sslflags:代表證書(shū)類型和綁定存儲(chǔ)的標(biāo)志。

2.2. 示例

2.2.1. 僅具有所需參數(shù)的用法示例:

site0-https-binding: win_iis.create_binding: - site: site0

2.2.2. 指定所有可用參數(shù)的用法示例:

site0-https-binding: win_iis.create_binding: - site: site0 - hostheader: site0.local - ipaddress: '*' - port: 443 - protocol: https - sslflags: 0

3. 刪除綁定

3.1. 參數(shù):

: site:IIS 站點(diǎn)名稱。 : hostheader:綁定的主機(jī)頭。 : ipaddress:綁定的IP地址。 : port:綁定的 TCP 端口。

3.2. 示例:

3.2.1. 僅具有所需參數(shù)的用法示例:

site0-https-binding-remove: win_iis.remove_binding: - site: site0

3.2.2. 指定所有可用參數(shù)的用法示例:

site0-https-binding-remove: win_iis.remove_binding: - site: site0 - hostheader: site0.local - ipaddress: '*' - port: 443

4. 將證書(shū)分配給 IIS 綁定。

證書(shū)分配到的 Web 綁定必須已經(jīng)存在。

4.1. 參數(shù)

:param str name:證書(shū)的指紋。 :param str site:IIS 站點(diǎn)名稱。 :param str hostheader:綁定的主機(jī)頭。 :param str ipaddress:綁定的IP地址。 :param str port:綁定的 TCP 端口。 :param str sslflags:代表證書(shū)類型和綁定證書(shū)存儲(chǔ)的標(biāo)志。

4.2. 示例

4.2.1. 僅具有所需參數(shù)的用法示例:

site0-cert-binding: win_iis.create_cert_binding: - name: 9988776655443322111000AAABBBCCCDDDEEEFFF - site: site0

4.2.2. 指定所有可用參數(shù)的用法示例:

site0-cert-binding: win_iis.create_cert_binding: - name: 9988776655443322111000AAABBBCCCDDDEEEFFF - site: site0 - hostheader: site0.local - ipaddress: 192.168.1.199 - port: 443 - sslflags: 1

5. 從 IIS 綁定中刪除證書(shū)。

5.1. 筆記:

此函數(shù)僅從 Web 綁定中刪除證書(shū)。它確實(shí)不刪除網(wǎng)絡(luò)綁定本身。

5.2. 參數(shù):

:param str name:證書(shū)的指紋。 :param str site:IIS 站點(diǎn)名稱。 :param str hostheader:綁定的主機(jī)頭。 :param str ipaddress:綁定的IP地址。 :param str port:綁定的 TCP 端口。

5.3. 示例

5.3.1. 僅具有所需參數(shù)的用法示例:

site0-cert-binding-remove: win_iis.remove_cert_binding: - name: 9988776655443322111000AAABBBCCCDDDEEEFFF - site: site0

5.3.2. 指定所有可用參數(shù)的用法示例:

site0-cert-binding-remove: win_iis.remove_cert_binding: - name: 9988776655443322111000AAABBBCCCDDDEEEFFF - site: site0 - hostheader: site0.local - ipaddress: 192.168.1.199 - port: 443

6. 創(chuàng)建 IIS 應(yīng)用程序池。

6.1. 筆記:

此函數(shù)僅針對(duì)應(yīng)用程序池名稱進(jìn)行驗(yàn)證,并將返回即使應(yīng)用程序池已經(jīng)存在但具有不同的配置也是如此。它不會(huì)修改現(xiàn)有應(yīng)用程序池的配置。

6.2. 參數(shù)

:param str name:IIS 應(yīng)用程序池的名稱。

6.3. 示例:

site0-apppool: win_iis.create_apppool: - name: site0

7. 刪除 IIS 應(yīng)用程序池。

7.1. 參數(shù)

:param str name:IIS 應(yīng)用程序池的名稱。

7.2. 示例:

defaultapppool-remove: win_iis.remove_apppool: - name: DefaultAppPool

8. 設(shè)置 IIS 容器的設(shè)置值。

8.1. 參數(shù)

:param str name:IIS 容器的名稱。:param str container: IIS 容器的類型。 容器類型是:AppPools, Sites, SslBindings:param str settings: 設(shè)置名稱及其值的字典.

8.2. 示例

8.2.1. AppPools 容器的使用示例:

site0-apppool-setting: win_iis.container_setting: - name: site0 - container: AppPools - settings: managedPipelineMode: Integrated processModel.maxProcesses: 1 processModel.userName: TestUser processModel.password: TestPassword processModel.identityType: SpecificUser

8.2.2. “站點(diǎn)”容器的使用示例:

site0-site-setting: win_iis.container_setting: - name: site0 - container: Sites - settings: logFile.logFormat: W3C logFile.period: Daily limits.maxUrlSegments: 32

9. 創(chuàng)建一個(gè) IIS 應(yīng)用程序。

9.1. 筆記:

此函數(shù)僅針對(duì)應(yīng)用程序名稱進(jìn)行驗(yàn)證,并將返回 True 即使應(yīng)用程序已經(jīng)存在不同的配置。 它不會(huì)修改現(xiàn)有應(yīng)用程序的配置。

9.2. 參數(shù):

:param str 名稱:IIS 應(yīng)用程序。 :param str site:IIS 站點(diǎn)名稱。 :param str sourcepath:物理路徑。 :param str apppool:IIS 應(yīng)用程序池的名稱。

9.3. 示例:

9.3.1. 僅具有所需參數(shù)的用法示例:

.. code-block:: yamlsite0-v1-app: win_iis.create_app: - name: v1 - site: site0 - sourcepath: C://inetpub//site0//v1

9.3.2. 指定所有可用參數(shù)的用法示例:

site0-v1-app: win_iis.create_app: - name: v1 - site: site0 - sourcepath: C://inetpub//site0//v1 - apppool: site0

10. 刪除 IIS 應(yīng)用程序。

10.1. 參數(shù):

:param str name:應(yīng)用程序名稱。 :param str site:IIS 站點(diǎn)名稱。

10.2. 示例:

site0-v1-app-remove: win_iis.remove_app: - name: v1 - site: site0

11. 創(chuàng)建 IIS 虛擬目錄。

11.1. 筆記:

此函數(shù)僅驗(yàn)證虛擬目錄名稱,并將返回 即使虛擬目錄已經(jīng)存在但具有不同的配置也是如此。 它不會(huì)修改現(xiàn)有虛擬目錄的配置。

11.2. 參數(shù):

:param str name:虛擬目錄名稱。 :param str site:IIS 站點(diǎn)名稱。 :param str sourcepath:物理路徑。 :param str app:IIS 應(yīng)用程序。

11.3. 示例:

11.3.1. 僅具有所需參數(shù)的用法示例:

site0-foo-vdir: win_iis.create_vdir: - name: foo - site: site0 - sourcepath: C://inetpub//vdirs//foo

11.3.2. 指定所有可用參數(shù)的用法示例:

site0-foo-vdir: win_iis.create_vdir: - name: foo - site: site0 - sourcepath: C://inetpub//vdirs//foo - app: v1

12. 刪除 IIS 虛擬目錄。

12.1. 參數(shù):

:param str name:虛擬目錄名稱。 :param str site:IIS 站點(diǎn)名稱。 :param str app:IIS 應(yīng)用程序。

12.2. 示例:

12.2.1. 僅具有所需參數(shù)的用法示例:

site0-foo-vdir-remove: win_iis.remove_vdir: - name: foo - site: site0

12.2.2. 指定所有可用參數(shù)的用法示例:

site0-foo-vdir-remove: win_iis.remove_vdir: - name: foo - site: site0 - app: v1

13. 設(shè)置 IIS Web 應(yīng)用程序的設(shè)置值。

13.1. 筆記:

此功能僅配置現(xiàn)有應(yīng)用程序。參數(shù)區(qū)分大小寫(xiě)。

13.2. 參數(shù):

:param str 名稱:IIS 應(yīng)用程序。 :param str site:IIS 站點(diǎn)名稱。 :param str settings:設(shè)置名稱及其值的字典。

13.3. 可用設(shè)置:

- ``physicalPath`` - webapp 的物理路徑 - ``applicationPool`` - webapp 的應(yīng)用程序池 - ``userName``“connectAs”用戶 - ``password`` "connectAs" 用戶密碼:rtype: bool

13.4. 示例:

site0-webapp-setting: win_iis.set_app: - name: app0 - site: Default Web Site - settings: userName: domain//user password: pass physicalPath: c:/inetpub/wwwroot applicationPool: appPool0

14. 設(shè)置 webconfiguration 設(shè)置的值。

14.1. 參數(shù):

:param str name: 包含設(shè)置的 IIS PSPath 的名稱??赡艿?PSPath 是: MACHINE, MACHINE/WEBROOT, IIS:/, IIS:/Sites/sitename, ... :param dict settings: Dictionaries of dictionaries. 您可以使用鍵內(nèi)的以下語(yǔ)法匹配集合中的特定項(xiàng)目: 'Collection[{name: site0}].logFile.directory'

14.2. 示例

14.2.1. MACHINE/WEBROOT PSPath 的使用示例:

MACHINE-WEBROOT-level-security: win_iis.webconfiguration_settings: - name: 'MACHINE/WEBROOT' - settings: system.web/authentication/forms: requireSSL: True protection: "All" credentials.passwordFormat: "SHA1" system.web/httpCookies: httpOnlyCookies: True

14.2.2. IIS:/Sites/site0 PSPath 的使用示例:

site0-IIS-Sites-level-security: win_iis.webconfiguration_settings: - name: 'IIS:/Sites/site0' - settings: system.webServer/httpErrors: errorMode: "DetailedLocalOnly" system.webServer/security/requestFiltering: allowDoubleEscaping: False verbs.Collection: - verb: TRACE allowed: False fileExtensions.allowUnlisted: False

14.2.3. 具有集合匹配的 IIS:/ PSPath 的使用示例:

site0-IIS-level-security: win_iis.webconfiguration_settings: - name: 'IIS:/' - settings: system.applicationHost/sites: 'Collection[{name: site0}].logFile.directory': 'C:/logs/iis/site0'
本文使用 Zhihu On VSCode 創(chuàng)作并發(fā)布

關(guān)鍵詞:管理

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點(diǎn)擊下載Chrome瀏覽器
關(guān)閉