Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to setup a subdomain in Apache2, I have two folders in www folder, ankurkaushal & owncloud. I want to make subdomain for owncloud.

I have a dedicated IP address for my server and I have setup A records on registrar's end too.

Whenever I try access owncloud.ankurkaushal.me, I get that owncloud.ankurkaushal.me is unavailable.

Here's my sites-available/default file:

<VirtualHost *:80>
    ServerAdmin ankurkaushal@outlook.com
    ServerAlias ankurkaushal.me
    DocumentRoot /var/www/ankurkaushal/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/ankurkaushal/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        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 warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

#Owncloud

<VirtualHost *:80>
    ServerAdmin ankurkaushal@outlook.com
    ServerName  owncloud.ankurkaushal.me
    ServerAlias owncloud.ankurkaushal.me
    DocumentRoot /var/www/owncloud/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/owncloud/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        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 warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Here is the most recent error.log

[Sun Aug 25 02:25:30 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.7 with Suhosin-Patch configured -- resuming normal operations
[Sun Aug 25 02:26:57 2013] [error] [client 24.212.255.66] File does not exist: /var/www/ankurkaushal/owncloud, referer: http://144.76.93.122/owncloud/

Can someone help me in resolving the issue?

share|improve this question
    
What error is your browser giving you? Name resolution, failure connecting to server, an HTTP error code? –  Shane Madden Aug 25 '13 at 1:27
    
I just get this, i.imgur.com/qApPMq9.png –  user99244 Aug 25 '13 at 1:30
    
Doesn't look like DNS is resolving for that hostname. Are you certain you have the DNS configured properly? –  Shane Madden Aug 25 '13 at 1:37
    
Host owncloud.ankurkaushal.me not found: 3(NXDOMAIN) Log in to Namecheap and fix this. –  Michael Hampton Aug 25 '13 at 1:40
    
I just added the A records, shouldn't that be sufficient. –  user99244 Aug 25 '13 at 1:41

1 Answer 1

As the comments are suggesting, your DNS does not resolve for this subdomain. A quick look up through dnsstuff.com gives the following:

Target  owncloud.ankurkaushal.me  
Timeout Value   1 (default)  
Your Overall Score  Lookup failed  

If you've added the A record to the zone file at Namecheap, give DNS propagation some time to complete before trying to access this subdomain.

share|improve this answer

Your Answer

 
discard

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.