Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've set up DNS record to test out using virtual hosts prior to moving one of my wordpress installs out of a subdomain. I want to move from to

I've tested the DNS resolution for with ping and I get a response with the correct public IP address.

Pinging [] with 32 bytes of data:
Reply from bytes=32 time=52ms TTL=62
Reply from bytes=32 time=56ms TTL=62
Reply from bytes=32 time=54ms TTL=62
Reply from bytes=32 time=60ms TTL=62

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 60ms, Average = 55ms

But trying to connect using Chrome I get:

Oops! Google Chrome could not connect to

And through telnet:

telnet 80
Connecting To not open connection to
the host, on port 80: Connect failed

I've tried to tail /apache2/access.log but nothing shows up when I make a request (the level is set to debug). I was expecting to see something here but there's nothing at all. What could be going wrong and what should I try next to diagnose the problem?

Edited to add:

The server is running Raspbian, so Debian-style Apache 2.

vhosts file, /etc/apache2/sites-available/blog looks like:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/blog
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel debug

    CustomLog ${APACHE_LOG_DIR}/access.log combined

There's also an .htaccess file in /var/www/blog/.htaccess:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /blog/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /blog/index.php [L] 

# END WordPress
share|improve this question

1 Answer 1

up vote 1 down vote accepted

How does your vhost configuration for the domain looks like?

It seems like apache isn't configured for the subdomain.

In what environment are you running your server in?


And Apache is starting up with this configuration without problems? Anything in the Apache error.log on startup?

There is no direcory-section for the blog directory - maybe adding the directory section helps.

[Update 2]

Are there more files located in the sites-enabled directory?

These files are loaded alphabetically - so maybe there is some directive in another file that stops the rendering of the logfiles?

[Update 3]

Dang - just saw it in your first post ... is the file linked in your sites-enabled directory? the sites-available directory isn't walked through by apache

[Update 4 - Chat Summary - Final Disclosure]

We figured out two problems in the chat.

The first one is the faulty .htaccess file: there was still a blog directory in the RewriteRule line which isn't right when using a subdomain

The second and even more fatal was a failing DNS configuration.

Both failures would've led to a similar error.

share|improve this answer
It's running on Raspbian, so Debian-style Apache 2 installation. Edited the question to include the vhost file. – Jamie Bull Apr 30 '14 at 12:18
Thanks. I've added suggestions to my answer. – kkugelmann Apr 30 '14 at 12:23
Nothing that looks relevant in the error log on restart. [Wed Apr 30 13:21:23 2014] [notice] caught SIGTERM, shutting down [Wed Apr 30 13:21:25 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u8 configured -- resuming normal operations [Wed Apr 30 13:21:25 2014] [info] Server built: Feb 8 2014 17:44:20 I tried adding a directory section for the blog directory and no change. – Jamie Bull Apr 30 '14 at 13:22
once again a update – kkugelmann Apr 30 '14 at 13:29
Yes, there is: 000-default is also enabled - should I disable that? – Jamie Bull Apr 30 '14 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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