我可以一次运行两个localhost站点吗? [英] Can I run two localhost sites at once?

查看:107
本文介绍了我可以一次运行两个localhost站点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图弄清楚我是否可以立即运行到localhost网站。比如

''localhost''和''site2.localhost''。


看来我可以设置它们,但不能运行它们同时。

是真的吗?如果是这样,那么MS的想法是什么?唉。


或者,是否有一种实用的方法让站点从你的根文件夹中的目录运行

,并以某种方式使它仍然遵守root-relative链接?


-Darrel

I''m trying to figure out if I can run to localhost sites at once. Such as
''localhost'' and ''site2.localhost''.

It appears I can set both of them up, but not run them at the same time. Is
that true? If so, what was MS thinking? Ugh.

Alternatively, is there a practical way to have a site run from a directory
within your root folder and somehow have it still obey root-relative links?

-Darrel

推荐答案

网站可能因IP地址,主机名或这个端口。


Windows XP专业版不支持运行多个站点,因为有些人可能会用它来做他们不应该做的事情to(比如运行一个糟糕的

托管公司)。


通常你通过使用一些工具解决ASP.Net中的链接问题,例如

as~在路径中,Request.ApplicationPath和类似的东西。你b $ b不应该开发一个在root工作的应用程序,它应该在两种情况下工作




你可能想看看:
http://www.informit.com/articles/art...&seqNum=2&rl=1

Karl


-

我的ASP.Net教程
http://www.openmymind.net/

" darrel" <无***** @ hotmail.com>在消息中写道

news:%2 ****************** @ TK2MSFTNGP12.phx.gbl ...
A site can differ by either the IP address, the hostname or the port.

Windows XP Pro doesn''t support running multiple sites because some people
would likely use it to do stuff they aren''t supposed to (like run a bad
hosting company off of it).

normally you solve link issues in ASP.Net by using a number of tools, such
as ~ in the path, Request.ApplicationPath and stuff like that. You
shouldn''t develop an application to work at the root or not, it should work
in both situations.

you might want to check out:
http://www.informit.com/articles/art...&seqNum=2&rl=1

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"darrel" <no*****@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
我想知道我是否可以立即运行到localhost站点。比如
''localhost''和''site2.localhost''。

看来我可以设置它们,但不能同时运行它们。
这是真的吗?如果是这样,那么MS的想法是什么?唉。

或者,是否有一种实用的方法可以让你的根文件夹中的网站从
目录运行,并以某种方式使它仍然服从root-relative
链接?

-Darrel
I''m trying to figure out if I can run to localhost sites at once. Such as
''localhost'' and ''site2.localhost''.

It appears I can set both of them up, but not run them at the same time.
Is
that true? If so, what was MS thinking? Ugh.

Alternatively, is there a practical way to have a site run from a
directory
within your root folder and somehow have it still obey root-relative
links?

-Darrel



> Windows XP专业版不支持运行多个站点,因为有些人
> Windows XP Pro doesn''t support running multiple sites because some people
可能会用它来做他们不应该做的事情(比如运行一个糟糕的托管公司) )。


这是我曾经听说过MS瘫痪产品的最愚蠢的借口。 ; o)


好​​吧,不是最愚蠢的,而是在那里。 ; oB

通常你通过使用许多工具解决ASP.Net中的链接问题,例如路径中的〜,Request.ApplicationPath和类似的东西。你不应该开发一个在root工作的应用程序,它应该在两种情况下都可以工作。


这似乎是一个很好的建议,但是根本不必总是在根源上相互链接吗?

b $ b你可能想看看:
http://www.informit.com/articles/art...&seqNum=2&rl=1
would likely use it to do stuff they aren''t supposed to (like run a bad
hosting company off of it).
That is the dumbest excuse I''ve ever heard for MS crippling a product. ;o)

OK, not the dumbest, but right up there. ;oD
normally you solve link issues in ASP.Net by using a number of tools, such
as ~ in the path, Request.ApplicationPath and stuff like that. You
shouldn''t develop an application to work at the root or not, it should work in both situations.
That seems like good advice, but wouldn''t it always have to be at the root
for root-relative linking?
you might want to check out:
http://www.informit.com/articles/art...&seqNum=2&rl=1




根路径参考语法看起来不错,但只是服务器端解决方案。我还需要处理所有客户端链接到CSS文件,js,图像,

和静态html文件。


* sigh *


-Darrel



Root Path Reference Syntax seems nice, but is only a server-side solution. I
still have to deal with all my client side links to CSS files, js, images,
and static html files.

*sigh*

-Darrel


如果您运行的是Windows Server 2003,则可以设置多个网站为

你想要的。在Windows XP Pro框中,您只能设置一个。但是你可以根据需要设置

尽可能多的单独的Web应用程序。


-

HTH,


Kevin Spencer

Microsoft MVP

..Net开发人员

我宁愿做个锤子比钉子好。


darrel <无***** @ hotmail.com>在消息中写道

news:%2 ****************** @ TK2MSFTNGP12.phx.gbl ...
If you''re running Windows Server 2003, you can set up as many web sites as
you want. On a Windows XP Pro box, you can set up only one. But you can set
up as many separate web applications in that site as you need.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I''d rather be a hammer than a nail.

"darrel" <no*****@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
我想知道我是否可以立即运行到localhost站点。比如
''localhost''和''site2.localhost''。

看来我可以设置它们,但不能同时运行它们。
这是真的吗?如果是这样,那么MS的想法是什么?唉。

或者,是否有一种实用的方法可以让你的根文件夹中的网站从
目录运行,并以某种方式使它仍然服从root-relative
链接?

-Darrel
I''m trying to figure out if I can run to localhost sites at once. Such as
''localhost'' and ''site2.localhost''.

It appears I can set both of them up, but not run them at the same time.
Is
that true? If so, what was MS thinking? Ugh.

Alternatively, is there a practical way to have a site run from a
directory
within your root folder and somehow have it still obey root-relative
links?

-Darrel



这篇关于我可以一次运行两个localhost站点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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