Forum Discussion
emreozanmemis
Mar 15, 2022Steel Contributor
IIS | APPCMD.exe ile default document eklemek (tr-TR)
APPCMD komutları ile IIS 10.0 yonetimi yazılarımıza devam ediyorum. Varsayılan dokuman kapsamında yeni bir default documents eklemek isterseniz APPCMD komutu ile bu işlemi çok basit bir komut ile gerçekleştirebilirsiniz.
APPCMD ile default document oluştumak isterseniz ilk olarak IIS "default documant" feature yüklü olması gerekmektedir. "Default Document" yüklemek için aşağıdaki PowerShell komutu ile "default document" feature yükleyebilirsiniz.
Install-WindowsFeature Web-Default-Doc
Feature yüklemesi tamamlandıktan sonra default document tanımlamak için APPCMD komut dizinine gidiyoruz. Yazımızda örnek olarak index.php ekleyerek devam edebiliriz. IIS10.0 kurulumu sonrası default document listesinde gelmeyen "index.php" ekleyerek işlemimiz gerçekleştreceğim.
appcmd set config /section:defaultDocument /+files.[value='index.php']
C:\Windows\System32\inetsrv>appcmd set config /section:defaultDocument /+files.[value='index.php']
Applied configuration changes to section "system.webServer/defaultDocument" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Eklediğinzi yada yükleme ile gelen varsayılan bir default document silmek içinde komutumuzda "+" yerine "-" kullanarak gerçekleştirebilirsiniz.
appcmd set config /section:defaultDocument /-files.[value='index.php']
C:\Windows\System32\inetsrv>appcmd set config /section:defaultDocument /-files.[value='index.php']
Applied configuration changes to section "system.webServer/defaultDocument" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
No RepliesBe the first to reply