开发者

Accessing a site via localhost instead of IP

How do i set it up so my php files in my sites folder can be viewed with just the com开发者_运维技巧mand

localhost/

instead of the default

http://10.0.1.35/~john/

the bottom one works fine but where do i need to change it so in my browser i can just enter localhost


check your /etc/hosts; it should have an entry 127.0.0.1 localhost. then you can just use http://localhost/. you can't just use localhost/ because that is not necessarily http and your browser may interpret that as a search or something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜