Mobile app version of vmapp.org
Login or Join
Voss4911412

: Why is my subdomain not returning anything? 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 mysite.com/blog

@Voss4911412

Posted in: #Apache #Virtualhost #WebHosting

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 mysite.com/blog to blog.mysite.com.

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

Pinging blog.mysite.com [x.xxx.xx.xx] with 32 bytes of data:
Reply from x.xxx.xx.xx: bytes=32 time=52ms TTL=62
Reply from x.xxx.xx.xx: bytes=32 time=56ms TTL=62
Reply from x.xxx.xx.xx: bytes=32 time=54ms TTL=62
Reply from x.xxx.xx.xx: bytes=32 time=60ms TTL=62

Ping statistics for x.xxx.xx.xx:
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 vhosts.youngbullindustries.com


And through telnet:

telnet blog.mysite.com 80
Connecting To blog.mysite.com...Could 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
ServerName blog.mysite.com ServerAlias blog.mysite.com
DocumentRoot /var/www/blog
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

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

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


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]
</IfModule>

# END WordPress

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Voss4911412

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bethany197

How does your vhost configuration for the blog.mysite.com domain looks like?

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

In what environment are you running your server in?

[Update]

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme