5

I running CentOS release 5.8 (Final) for my WordPress blog (deluxeblogtips.com). I have a backup plugin BackupBuddy, and it says:

HTTP Loopback Connections are not enabled on this server

After some tries on Google, I found some solutions, but none work. The best answer I think is changing the /etc/hosts file, and I already did that:

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

But the warning from the plugin still appears.

I also tested in command line:

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

All work.

I don't know what's right now. My blog is running slow, and I guess the HTTP loopback connection is the main problem. Any help is appreciated! Thanks!

Edit:

More information about the web server (Apache)

Listen 80

And

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

(I host some other sites on the server as well, default is taiphanmem.org)

5
  • Did you tried looking at ithemes.com/codex/page/…
    – atvt
    Commented Aug 24, 2012 at 17:02
  • I tried, no luck. That solution just enables the alternative WP cronjob, which doesn't solve the problem with server. I'm looking for a real solution.
    – Anh Tran
    Commented Aug 24, 2012 at 17:48
  • This question would probably do better on our dedicated Wordpress Site -- I can move it there if you would like, but it doesn't seem to be on-topic for Server Fault...
    – voretaq7
    Commented Aug 24, 2012 at 18:17
  • @voretaq7 I don't think so. I'm an active member at WPSE. And I believe that this problem is related with server than WordPress.
    – Anh Tran
    Commented Aug 24, 2012 at 19:04
  • Is your server behind NAT? If so, it sounds like it's behind crappy consumer NAT and not server-grade NAT. Commented May 13, 2013 at 3:48

2 Answers 2

1

The solution is to instruct the server to answer with the right content for the requests directed towards 127.0.0.1. In order to do this you need a VirtualHost directive linked to this loopback address :

<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>

You will need an entry of this type for each domain you are hosting on the server, even though you might already have an entry for your domain.

Cosmin Ioachim Damian.

1
  • 1
    Are you suggesting that wildcards somehow don't work as intended? Like OP, I have a VirtualHost rule for *:80 (alongside a rule for *:443), I found it hard to believe that you need a duplicated rule for 127.0.0.1 only, so I tried, but as expected it did not resolve the Wordpress loopback issues.
    – mastazi
    Commented May 30, 2019 at 4:02
1

Along the lines' of Cosmin's answer, but not quite, I had this issue because my vhost entry was not completely configured. A lot of people follow simple local dev vhost tutorials, which show you just the basics. In fact, you need a more-complete vhost entry, including rules, which solves this without any hosts files voodoo (beyond 127.0.0.1 example.com)

File: /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

File: /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>

Now, granted, there is more in the Directory than you need. But it works.

At least for me.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .