在IIS 7中使用myfakesite.com而不是本地主机的 [英] use myfakesite.com instead of localhost in IIS 7

查看:105
本文介绍了在IIS 7中使用myfakesite.com而不是本地主机的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟着这个步骤:

我所做的是编辑这个文件:C:\\ WINDOWS \\ SYSTEM32 \\ DRIVERS \\ ETC \\主机

What I did is edit this file: C:\Windows\System32\drivers\etc\hosts

我添加了一行:
  127.0.0.1 myfakesite.com

I added a line: 127.0.0.1 myfakesite.com

然后我去了Facebook的编辑应用页面,特别是网站
  设置并进入网站网址: http://myfakesite.com 域:
  myfakesite.com

Then I went to the Facebook edit app page, specifically the "Web Site" setting and entered Site Url: http://myfakesite.com Domain: myfakesite.com

而不是运行IIS防爆preSS,我还得跑完整的IIS并启用
  myfakesite.com作为绑定之一。这里是你如何做到这一点:1)
  启动Internet信息服务管理器2)导航到
  默认Web站点3)右键点击该节点上,选择编辑
  绑定4)在打开单击对话框添加5)输入
  myfakesite.com在主机名,然后单击确定

Instead of running IIS Express, I had to run full IIS and enable myfakesite.com as one of the bindings. Here is how you do it: 1) Launch Internet Information Services Manager 2) Navigate to the "Default Web Site" 3) Right click on that node and choose "Edit Bindings" 4) In the dialog that opens click Add 5) Enter myfakesite.com in "Host Name" and click OK


为什么我得到什么?

Why do I get?

PS:我试图按照<一个href=\"http://facebooksdk.$c$cplex.com/wikipage?title=Getting%20Started%20with%20an%20ASP.NET%20MVC%203%20Website%20%28With%20Javascript%20SDK%29&referringTitle=Documentation\"相对=nofollow>此内容教程,但我想用IIS 7不前preSS。

PS: I was trying to follow this tutorial, but I wanted to use IIS 7 not express.

推荐答案

修改主机文件后,进入IIS管理器!

在左侧面板转到网​​站,右键点击它,然后点击添加网站(PIC下)

After editing hosts file, Go to IIS manager!
in left panel go to SITES,right click on it, and click Add web site(pic below)

在新窗口中填写的所有字段:

in new window fill all fields:

在画面我创建新的网站 test.hkh.com

站点名称:只为您的网站的名称。它可以是任何东西

物理路径:在您的硬盘
IP地址:可以保留默认

主机名:在浏览器的地址栏中输入地址

in picture I created new website test.hkh.com!
site name: a name just for your web site. it can be anything
physical Path: a folder on your hard disk
IP address: can be left with default
host name: the address you enter in address bar of your browser

OK!现在你有了新的站点运行!

ok! now you have new site running!



修改如果您想www.test.hkh.com添加到您的服务器,就没有必要建立新的网站!只需点击你的网站在左侧面板的名称,然后在右侧面板中,点击绑定,在该窗口中点击添加主机名
输入: www.test.hkh.com

点击确定


If you want to add www.test.hkh.com to your server, there is no need to create new website! Just click on name of your site in left panel, then in right panel, click on Bindings, in this window click Add
in host name enter: www.test.hkh.com!
Click on Ok!

这篇关于在IIS 7中使用myfakesite.com而不是本地主机的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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