如何使用 Ansible 將 NginX 默認頁面更改為空白?
我需要將默認Welcome to nginx!頁面更改為空白。
uj5u.com熱心網友回復:
在下面的示例中,該模塊file用于簡單地洗掉現有的 index.html 并創建一個空的。
- hosts: webserver
tasks:
- name: Delete file
file:
path: /var/www/html/index.html
state: absent
- name: Create empty index.html file
file:
path: /var/www/html/index.html
state: touch
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/441018.html
