in a bit of a bind here. I'm trying to move a website (www.monkhouselaw.com) from one hosting company to my Digital Ocean VPS. I've changed the DNS settings to:

* ->
www ->
monkhouselaw ->

This then directs to an Apache Virtual Host on my VPS.

Currently I'm just trying to load a single PHP index page on my server. Once it works I'll bring over the WordPress install. Sadly, it's, well, not working.

Accessing www.monkhouselaw.com returns a 503 error currently. I simply can't determine why. Examining the Apache error log shows me:

(111)Connection refused: AH00957: HTTP: attempt to connect to (localhost) failed
[Sun Jun 05 16:44:46.900331 2016] [proxy:error] [pid 2207] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Sun Jun 05 16:44:46.900339 2016] [proxy_http:error] [pid 2207] [client] AH01114: HTTP: failed to make connection to backend: localhost, referer: (long url)

And, later, this:

[Sun Jun 05 16:45:21.841236 2016] [proxy:error] [pid 2198] AH00940: HTTP: disabled connection for (localhost)

I've tried checking to see if port 3000 on localhost is listening, and it's not. However, there's a pre-existing virtual host that should be, as I understand it, redirecting requests to the 3000 port to the 80 port. The file is 000-default.conf. There's much more to the file than the following, but here's the relevant bits:

<VirtualHost *:80>

    LoadModule proxy_module {path-to-modules}/mod_proxy.so 
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/


Though honestly, I'm unsure why it's even attempting to access port 3000, as the virtual host file for monkhouselaw is directed to the 80 port:

<VirtualHost *:80>
    DocumentRoot /var/www/monkhouse
    ServerName monkhouselaw.com
    <Directory "/var/www/monkhouse">
        allow from all
        Options None
        Require all granted

At this point I'm at a loss. Googling reveals a great many results concerning SELinux, which doesn't appear to be installed. I've seen recommendations, for example, to type the following:

togglesebool httpd_can_network_connect

Which simply returns me the message that the program 'togglesebool' does not exist.

In essence, this is a serious issue that I need to resolve, and I've been through the double-digit Google result pages trying to find solutions with no luck.

Is anyone able to offer assistance?

  • 1
    Server Fault is not a great place for urgent issues. If you need help now, then hire someone. There are plenty of people on this site that will do freelance consulting, even in small amounts.
    – EEAA
    Jun 5, 2016 at 21:28

1 Answer 1


Your understanding on apache configuration is a bit backwards and upside-down. I'd suggest reading the documentation on any new software you're trying to configure. :)

In short, this part of your virtualhost config:

<VirtualHost *:80>

...has nothing to do with how apache handles connections to the virtualhost. Rather, it configures the listener which receives your request. In this case, it's listening on all IP addresses (*), on port 80 (80).

The things inside of the vhost declaration describe to apache how it is supposed to handle connections to that virtualhost. In the case of the snipped you provided, it's listening on port 80, and directing requests to port 3000, just like it's configured to do. You didn't include that entire configuration block, so it's unclear whether or not this is a name-based virtualhost.

Next, your second snippet only includes monkhouselaw.com as a ServerName. That is the only name you can use with this site and expect things to work. As you currently have things configured, www.monkhouselaw.com will not work. You need to add that as a ServerAlias.

  • Thank you very much! That appears to have worked. As per my understanding of Apache... I don't jump into my life story here, but suffice to say I've been sort of dropped into a position with very inadequate preparation! I'm just trying to play catch-up with whatever info I need to know in the immediate present, which until now, didn't include virtual host configuration files :) Thank you again!
    – CGriffin
    Jun 5, 2016 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.