0

I have a WordPress Multisite installation, with quite a few subdomain sites set up. These all work perfectly fine, however the main domain doesn't work. It doesn't even show a white screen, or any errors; it just hangs when loading. I've tried adding a HTML file to the root directory for the virtual host, and it hangs when loading that as well.

I believe I have done all the setup correctly (it's been setup for quite a while now and the main domain has worked previously - it's only recently it's stopped working); when I run httpd -t -D DUMP_VHOSTS, I get this output:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server localhost (/private/etc/apache2/extra/httpd-vhosts.conf:44)
         port 80 namevhost localhost (/private/etc/apache2/extra/httpd-vhosts.conf:44)
         port 80 namevhost 5lines.dev (/private/etc/apache2/extra/httpd-vhosts.conf:49)
         port 80 namevhost localhost (/private/etc/apache2/other/aaa_default.conf:1)
Syntax OK

I've checked the Apache error logs (/var/logs/apache2/error_log and access_log and I get no errors - however when I restart Apache I do get [warn] Init: Session Cache is not configured [hint: SSLSessionCache]).

Here is how my Virtual Host is set up in /etc/apache2/extra/httpd-vhosts.conf:

 <VirtualHost *:80>
      DocumentRoot "/Library/WebServer/Documents/5lines"
      ServerName 5lines.dev
      ServerAlias *.5lines.dev
      ErrorLog /Users/Tom/Desktop/error.log
 </VirtualHost>

The error.log shows nothing either.

My hosts file for localhost looks like this:

127.0.0.1   localhost 5lines.dev site1.5lines.dev site2.5lines.dev
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0 localhost

(these lines are the first entries after the commented out section at the top of the file).

I am running Mac OS X 10.9.4 on a Macbook Pro mid-2010. I have set up on my own localhost server (i.e not using XAMPP, LAMP etc). When I run httpd -v, it returns:

Server version: Apache/2.2.26 (Unix)
Server built:   Dec 10 2013 22:09:38

Also, here are the contents of /private/etc/apache2/other/aaa_default.conf:

 <VirtualHost *:80>
   #no need for settings, use apache defaults.
 </VirtualHost>

I have also pasted the contents of httpd.conf, to pastebin: http://pastebin.com/zCVSh2F4

If you want any other set up details I'd be happy to provide them.

Thanks for any help :)

P.S The reason I'm pretty sure it's Apache is that the WordPress database gets sent live, so the stuff that's on the local database is pretty much the same as the stuff that's in the live one (except for changed server names etc). The main domain and all the subdomains work on the live site. This is the same for the themes/folder. If it is down to WordPress then I'm very sorry.

I also used to have pow installed, but I uninstalled it to see if my virtual host would work, but it made no difference.

EDIT: @pelle asked me to include what the output is for curl -I http://5lines.dev:

HTTP/1.1 200 OK
Date: Sat, 30 Aug 2014 13:49:02 GMT
Server: Apache/2.2.26 (Unix) DAV/2 PHP/5.5.8 mod_ssl/2.2.26 OpenSSL/0.9.8y
X-Powered-By: PHP/5.5.8
X-Pingback: http://5lines.dev/xmlrpc.php
Link: <http://5lines.dev/>; rel=shortlink
Content-Type: text/html; charset=UTF-8

it took ages to give me the output. If I did the same for a subdomain of 5lines.dev, which works perfectly in the browser, it took hardly any time at all, but gave exactly the same output.

5
  • Could you try running curl -I http://5lines.dev/ ?
    – pelle
    Aug 30, 2014 at 13:44
  • @pelle I've edited my post to include the output :)
    – Tom Oakley
    Aug 30, 2014 at 13:56
  • OK, that looks good. Does curl http://5lines.dev/ give you the web page? In that case it could be an issue with your browser. Perhaps it has cached a redirect or something.
    – pelle
    Aug 30, 2014 at 14:05
  • yeah curl http://5lines.dev gives me the HTML, although again it takes ages. I'll look into clearing the caches, flushing DNS and things then. thanks :)
    – Tom Oakley
    Aug 30, 2014 at 14:08
  • Hi @pelle, I've posted another post <a href="superuser.com/questions/805105/…>, thanks for helping me out on this one :)
    – Tom Oakley
    Aug 30, 2014 at 15:22

0

You must log in to answer this question.

Browse other questions tagged .