-1

I have configured a subdomain in my Apache2 httpd server, but having a problem. I can reach the subdomain by using http://subdomain.domain.com but do not access it by using www.subdomain.domain.com

My top-level domain say, domain.com can be reached with both http://domain.com and www.domain.com

Here is source from my subdomain config file in sites-available

<VirtualHost *:80>
    ServerName subdomain.domain.com
    ServerAlias www.submdomain.domain.com
    ServerAlias http://www.subdomain.domain.com

    ServerAdmin admin@domain

    DocumentRoot /var/www/domain/subdomain
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/domain/subdomain>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

Where is the problem? Here in this configuration or in A records of my domain name?

EDIT : I get this message from my ISP when I try to reach by www.subdomain.domain.com = "Sorry, the website you were looking for is unavailable."

And when I used a proxy to reach it, it shows this error message = "The requested resource could not be loaded. libcurl returned the error: Couldn't resolve host 'www.subdomain.domain.com"

Abhinav
  • 743
  • 2
  • 9
  • 20
  • What happens or error message do you get when you try to access www.subdomain.domain.com ? – user9517 Aug 27 '12 at 09:04
  • @Iain: I cannot reach there, my ISP shows this message "Sorry, the website you were looking for is unavailable." – Abhinav Aug 27 '12 at 09:06

2 Answers2

0

You'd need to provide more details, ie. what error is returned when you try to reach your www.subdomain.domain.com. My guess is you don't have www.subdomain.domain.com in your DNS server.

MadWizard
  • 21
  • 2
0

Couldn't resolve host 'www.subdomain.domain.com"

You need to configure your DNS to resolve www.subdomain.domain.com to your server's IP address.

user9517
  • 115,471
  • 20
  • 215
  • 297