要更改本地主机 [英] want to change localhost

查看:97
本文介绍了要更改本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生/女士
最初,我当时在php上工作,因此在我的PC上安装了MySql服务器.现在,我正在使用ASP.NET.我已经安装了IIS 6服务器/VS2010/sql server2005.但是,当我在浏览器中编写localhost时,它将打开默认的MySql服务器页面.路径是"C:\ xampplite \ htdocs",我想成为"C:\ inetpub \ wwwroot"来运行asp.net服务器.我该如何改变呢? N我可以像php页面一样在lan上运行asp.net页面吗?请帮我.
Thnaks.

Sir/Madam
Initially I had installed MySql server on my pc beacuase I was working on php at that time. Now I am working on ASP.NET. I have installed IIS 6 server/VS2010/sql server2005. But when I write localhost on my browser, it opens the default MySql server pages. The path is "C:\xampplite\htdocs", which I want to be "C:\inetpub\wwwroot" to run asp.net server. How could I change that? N can I run asp.net pages on lan like php pages? Please help me.
Thnaks.

推荐答案

更改PHP/MySQL的默认端口,在http.conf中搜索文本80,将80替换为您要让Apache监听的端口(用于例如8081),现在重新启动服务器,您就可以通过端口localhost:8081来访问php和Msql.
Change the default port for PHP/MySQL,in http.conf,search for text 80, replace 80 to whichever port you want apache to listen(for eg 8081),restart your server now you can access your php and Msql by port localhost:8081


正如Syed回答的那样,您可以更改端口号.适用于Apache.

如果您不想这样做,则可以更改端口号.使IIS运行ASP.net.
您面临的问题仅是因为IIS和Apache都使用默认端口80.这会导致在运行哪个服务器时发生冲突.

因此,您必须更改端口号.对任何人.

检查以更改II6中的端口:

配置IIS 6 [ ^ ]

希望对您有所帮助:)
As answered by Syed, you can change your port no. for Apache as described.

If you don''t want to do so, then you can change the port no. for IIS to run ASP.net.
The Problem you are facing is just because both IIS and Apache uses the default port 80. which causes conflict to run which server.

Hence you have to change the port no. for any one.

check this for changing the port in II6:

Configuring IIS 6[^]

hope it helps :)


这篇关于要更改本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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