如何使用APPCMD更改IIS7中的网站物理路径? [英] How do I change the physical path of web site in IIS7 with APPCMD?

查看:1247
本文介绍了如何使用APPCMD更改IIS7中的网站物理路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过命令行通过appcmd.exe工具更改网站的物理路径,但我无法弄清楚语法。有人可以帮忙吗?

I need to change the physical path of a web site through the command line via the appcmd.exe tool, but I can't figure out the syntax. Can someone help?

推荐答案

这是你应该做的:

C:\ Windows \ System32 \inetsrv> appcmd set vdirMySite /-physicalPath:C:\inetpub\temp

C:\Windows\System32\inetsrv>appcmd set vdir "MySite/" -physicalPath:"C:\inetpub\temp"

注意:MySite /是您虚拟目录的名称,因此如果您的虚拟目录位于默认网站下,您可能需要设置默认网站/ MySite /

Note: "MySite/" is a name of your virtual directory so if your virtual directory is under default web site you're likely have to set "Default Web Site/MySite/"

至于搞清楚如何做其他appcmd命令只需输入: appcmd set vdir /?

As for figuring out how to do other appcmd commands just type: appcmd set vdir /?

您将获得有关如何设置虚拟目录的所有信息。

and you'll get all the info on what you can do to set your virtual directory.

更具体地说,如果您想知道可以为特定虚拟目录类型更改哪些设置: appcmd set vdirMySite //?

Even more specifically, if you want to know what settings you can change for the specific virtual directory type:appcmd set vdir "MySite/" /?

这些示例仅适用于虚拟目录,适用于其他appcmd命令

These examples are just for virtual directory by they apply to other appcmd commands

希望这有助于

这篇关于如何使用APPCMD更改IIS7中的网站物理路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆