Domain names point to 127.0.0.1 in the pan

2010-11-29  来源:本站原创  分类:Ruby  人气:119 

Doing the second level domain to support the project, the need to configure multiple domain names point to 127.0.0.1, and the second level domain is a dynamic increase.

In the change / etc / hosts when there is such a demand would be: 127.0.0.1 *. domain.com

Unfortunately, / etc / hosts do not support such a configuration. So good people to provide domain name resolution to the pan 127.0.0.1. This domain name are:

lvh.me

smackaho.st

Take a look:

Holin: ~ holin $ ping lvh.me

PING lvh.me (127.0.0.1): 56 data bytes

64 bytes from 127.0.0.1: icmp_seq = 0 ttl = 64 time = 0.044 ms

64 bytes from 127.0.0.1: icmp_seq = 1 ttl = 64 time = 0.042 ms

HoLin: ~ holin $ ping whatever.lvh.me

PING whatever.lvh.me (127.0.0.1): 56 data bytes

64 bytes from 127.0.0.1: icmp_seq = 0 ttl = 64 time = 0.035 ms

You can now visit our Rails applications like to be like this:

http://subdomain1.smackaho.st:3000/

http://subdomain2.lvh.me:3000/

Really convenient!

Starting: http://www.holin.info/posts/4cf34124ff1f015420000002

相关文章
  • Domain names point to 127.0.0.1 in the pan 2010-11-29

    Doing the second level domain to support the project, the need to configure multiple domain names point to 127.0.0.1, and the second level domain is a dynamic increase. In the change / etc / hosts when there is such a demand would be: 127.0.0.1 *. do

  • mysql_connect localhost和127.0.0.1的区别(网络层阐述) 2014-11-02

    这篇文章主要介绍了mysql_connect localhost和127.0.0.1的区别(网络层阐述),本文从网络通信层面讲解了它们的不同,需要的朋友可以参考下 connects.php mysql_connect('127.0.0.1','root','zzzizzz1'); mysql_connect('localhost','root','zzzizzz1'); 使用strace获取系统调用: 复制代码 代码如下: strace php connects.php 2>&1 | gre

  • 127.0.0.1 localhost and can not flex in the mix 2010-02-10

    Use the button to respond to http://localhost:8080/, in the browser http://127.0.0.1:8080 not able to respond to the request. . . . Reason is valid and is looking for

  • Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) 2010-03-25

    From: http://www.techiegyan.com/?p=178 Problem: Few days back we were working with Apache web server and were using it for proxy. We want to use HTTPD for directing requests to 8080 port where Apache tomcat was running. We configured the proxy settin

  • 127.0.0.1 localhost What is the difference with 2010-06-15

    I believe some people would say that is a local ip, it has been said, with more than 127.0.0.1 localhost, they could reduce the time resolution. Introduction to the problem also seems clear that, in fact, there are differences between the two. localh

  • java.net.ConnectException: localhost/127.0.0.1: 8080 solution 2010-07-23

    Procedures need to send the data to the server, so wrote a servlet to do simple data acceptance testing, but reported the following exception: java.net.ConnectException: localhost/127.0.0.1: 8080 - Connection refused Error code in this section URL ur

  • About Oracle can not use 127.0.0.1 and localhost problems 2010-10-09

    This issue has been bothering me for a long time, although the search to the point of things, but did not know how to change, and today they met this problem, you, the mind to carry out his look, but still O, Oh, to issue to make everyone believe a r

  • Deployment of the service to the local java.net.ConnectException: localhost/127.0.0.1: 3000 - Connection re 2010-11-20

    To facilitate the development of server-side code will be deployed to local access, the results of access error, java.net.ConnectException: localhost/127.0.0.1: 3000 - Connection refused? A little surprised, check the online information search, the r

  • 127.0.0.1/localhost connection refused problem 2011-01-05

    Exception 1: java.net.ConnectException: localhost/127.0.0.1: 8080 - Connection refused The problem is this, android emulator (simulator) to its own as a localhost, that is, the code used to access localhost or 127.0.0.1, is access to the emulator you

  • localhost and 127.0.0.1 2011-09-06

    localhost, also known as local, the correct interpretation is: local server 127.0.0.1 in windows systems such as the correct interpretation is: the local address (local server) localhot (local) is not transmitted by the card! This is important, it is

  • Open port on the server localhost/127.0.0.1 of 50,000 Socket Error 2011-07-10

    The first time yesterday with jdbc to connect to DB2 database that will be very easy, and I did not expect to get it got to noon today, really unhappy, and engaged in this operation did not know how many times, but it is not even over db2. Previous c

  • external address is 127.0.0.1 tcp solution 2011-10-22

    Do jpcap capture test today and found my letter of the external address is flying TCP 127.0.0.1:52232 127.0.0.1:1110 ESTABLISHED 5676, this obviously is the agent. After I carefully traced, I found caused by Kaspersky, which should permit before I ob

  • 127.0.0.1无法访问,没有权限: GetObject 2013-11-30

    解决127.0.0.1无法访问和0x800A0046 没有权限: 'GetObject'的方案 先感谢 D8-笨阿猪 D8-忘优草 D8-狼芽 的帮忙调试 ============================================ 一般,当我们在本机调试ASP动态网页时,可输入 http://localhost http://本地计算机名 http://127.0.0.1 在当输入http://127.0.0.1 时,一般机器都需要输入用户名和密码进入,这里将分两种情况: 一种是刚

  • apache服务器一个ip(如:127.0.0.1)和多个域名(虚拟主机)的绑定 2014-03-31

    今天在学习PHP时,用的是apache服务器有这样的一个需求:一个ip(如:127.0.0.1)和多个域名(虚拟主机)绑定,以下是我的解决方案,需要的朋友可以参考下 今天在学习PHP时,有这样的一个需求:一个ip(如:127.0.0.1)和多个域名(虚拟主机)绑定,以下是我的解决方案: 解决方案一:通过端口来区分不同的虚拟主机 ①按照绑定一个站点的方法做好准备 1. 先开发好自己的网站(d:/myblog(存放在D盘的myblog目录下)) 2. 配置httpd.conf文件(存放在apache

  • php mysql localhost,127.0.0.1和ip区别 2014-05-18

    localhost与127.0.0.1的区别是什么?相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少一次解析.看来这个入门问题还有人不清楚,其实这两者是有区别的 一家之言: localhost与127.0.0.1的区别 localhost与127.0.0.1的区别是什么?相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少一次解析.看来这个入门问题还有人不清楚,其实这两者是有区别的. no1: localhost也叫loca

  • Serv-U 无法连接到服务器127.0.0.1,端口43958 之解决办法 2015-04-29

    今天在帮朋友配置服务器的时候发现的一个问题,进入serv-u管理员工具的时候提示无法连接,非常的讨厌,后来参考了这篇文章和先前自己操作的几个步骤,解决了这个问题. Serv-U"无法连接到服务器127.0.0.1,端口43958"的原因 始终搞不明白问题出在哪里,后上网查了资料,大概原因如下: 43958,这是Serv-U的本地管理端口,只允许127.0.0.1连接,这个端口不能连接,是因为: 1. 权限错.(本人再将system加进,且赋予默认权限,问题解决.) 2. 可能软件本身问

  • CentOS下php使用127.0.0.1不能连接mysql的解决方法 2015-04-30

    这篇文章主要介绍了CentOS下php使用127.0.0.1不能连接mysql的解决方法,本文原因是SELINUX导致的连接失败,需要的朋友可以参考下 php代码很简单: $server="127.0.0.1"; println("Begin"); $link = mysql_connect($server,"mysql","mysql"); if (!$link) { die('Could not connect: ' .

  • localhost 与 127.0.0.1 的区别 2012-01-12

    转自:http://www.linuxde.net/2011/11/2915.html localhost与127.0.0.1的区别是什么?相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少一次解析.看来这个入门问题还有人不清楚,其实这两者是有区别的. 1.localhost也叫local ,正确的解释是:本地服务器 127.0.0.1在Windows等系统的正确解释是:本机地址(本机服务器) 他们的解析通过本机的host文件,windows自动将localh

  • java连接mongodb报:couldn't connect to [/127.0.0.1:... 2012-12-06

    2012-12-6 14:24:13 com.mongodb.DBTCPConnector initDirectConnection 警告: Exception executing isMaster command on /127.0.0.1:27017 java.io.IOException: couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect at c

  • localhost 127.0.0.1和本机ip三者的区别 2013-09-02

    localhost 不联网 不使用网卡,不受防火墙和网卡限制 本机访问 127.0.0.1 不联网 网卡传输,受防火墙和网卡限制 本机访问 本机IP 联网 网卡传输 ,受防火墙和网卡限制 本机或外部访问