如何启用HTTP环回连接?

我为我的WordPress博客(www.deluxeblogtips.com)运行CentOS版本5.8(最终版)。 我有一个备份插件BackupBuddy ,它说:

此服务器上未启用HTTP环回连接

在Google上尝试一些之后,我find了一些解决scheme,但都没有成功。 我想最好的答案是更改/etc/hosts文件,我已经这样做了:

 127.0.0.1 localhost localhost6 localhost.localdomain localhost6.localdomain6 127.0.0.1 taiphanmem.org www.taiphanmem.org 127.0.0.1 deluxeblogtips.com www.deluxeblogtips.com ::1 localhost localhost6 localhost.localdomain localhost6.localdomain6 ::1 deluxeblogtips.com www.deluxeblogtips.com ::1 taiphanmem.org www.taiphanmem.org 

但是插件的警告仍然出现。

我也在命令行testing:

 wget www.deluxeblogtips.com curl www.deluxeblogtips.com telnet 0 80 

所有的工作。

我不知道现在是什么 我的博客运行缓慢,我猜HTTP环回连接是主要问题。 任何帮助表示赞赏! 谢谢!

编辑:

有关Web服务器(Apache)的更多信息

 Listen 80 

 apachectl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server taiphanmem.org (/usr/local/apache/conf/extra/httpd-vhosts.conf:2) port 80 namevhost taiphanmem.org (/usr/local/apache/conf/extra/httpd-vhosts.conf:2) port 80 namevhost deluxeblogtips.com (/usr/local/apache/conf/extra/httpd-vhosts.conf:9) Syntax OK 

(我还在服务器上托pipe了一些其他的站点,默认是taiphanmem.org)

解决scheme是指示服务器以正确的内容来回答针对127.0.0.1的请求。 为了做到这一点,你需要一个VirtualHost指令链接到这个环回地址:

 <VirtualHost 127.0.0.1> DocumentRoot /var/www/yourdomain ServerName www.yourdomain.ro ServerAlias yourdomain.ro ServerAdmin [email protected] ErrorLog logs/webserv/xgraphic_error_log CustomLog logs/access_log combined </VirtualHost> 

即使您可能已经有一个针对您的域名的条目,您仍然需要为您在服务器上托pipe的每个域input此types的条目。

Cosmin Ioachim Damian。

沿着Cosmin的答案,但不完全,我有这个问题,因为我的虚拟主机条目没有完全configuration。 很多人都遵循简单的本地开发虚拟主机教程,这些教程只是向您展示基础知识。 事实上,你需要一个更完整的虚拟主机条目,包括规则,这解决了这个没有任何主机文件voodoo(超越127.0.0.1 example.com)

文件:/ etc / hosts

 # Localhost 127.0.0.1 localhost ::1 localhost # Your custom, local dev site 127.0.0.1 local.example.com ::1 local.example.com 

文件:/path/to/apache2/extras/httpd-vhosts.conf:

 <VirtualHost *:80> ServerName local.example.com ServerAlias local.example.com DocumentRoot "/Users/examplename/Sites/example.com" <Directory "/Users/examplename/Sites/example.com"> Options Indexes FollowSymLinks Includes execCGI AllowOverride None Order Allow,Deny Allow From All </Directory> 

现在,认为,目录中有更多的东西比你需要。 但它的作品。

至less对于我来说。