0

I'm trying to move from one ubuntu VPS set up to another and I'm having subdomain issues, that I did not have on my old server. I am unsure whether my problem lies in the DNS records or with Apache. Unfortunately I do not have access to the DNS records of my old server, only those of the new

The problem:

domainname.com and www.domainname.com
are not displaying code from my new server, the code on the old server is displaying I want these URLs to show the code in /var/www/domainname.com.live

stage.domainname.com
is working as desired, showing code from my new server, specifically /var/www/stage.domainname.com.live

Sanity check:

  • I have no .htaccess files
  • I have checked that mod_rewrite is enabled
  • The sites below are "enabled" with a2ensite
  • The nameservers were switched to my new server 5 days ago

DNS records for my new server:

*.domainname.com        181.102.220.244 domainname.com  86400       A   
domainname.com        181.102.220.244 domainname.com  600         A 
stage.domainname.com    181.102.220.244 domainname.com  600         A   

Code excerpts from my new server:

file /etc/apache2/sites-available/domainname.com

<VirtualHost *:80>

    ServerName  domainname.com
    ServerAlias www.domainname.com

    DocumentRoot /var/www/domainname.com.live
    DirectoryIndex index.php

    ServerSignature Email

    <Directory "/var/www/domainname.com.live">
        RewriteEngine on
        RewriteBase /
        RewriteCond $1 !^(favicon\.ico|admin\.php|index\.php|assets|assets-uploaded|robots\.txt)
        RewriteRule ^admin/(.*)$ /admin.php?$1 [L]
        RewriteCond $1 !^(favicon\.ico|admin\.php|index\.php|assets|assets-uploaded|robots\.txt)
        RewriteRule ^(.*)$ /index.php?$1 [L]
    </Directory>

</VirtualHost>

file /etc/apache2/sites-available/stage.domainname.com

<VirtualHost *:80>

    ServerName  stage.domainname.com
    ServerAlias stage.domainname.com

    DocumentRoot /var/www/stage.domainname.com.live
    DirectoryIndex index.php

    ServerSignature Email

    <Directory "/var/www/stage.domainname.com.live">
        RewriteEngine on
        RewriteBase /
        RewriteCond $1 !^(favicon\.ico|admin\.php|index\.php|assets|assets-uploaded|robots\.txt)
        RewriteRule ^admin/(.*)$ /admin.php?$1 [L]
        RewriteCond $1 !^(favicon\.ico|admin\.php|index\.php|assets|assets-uploaded|robots\.txt)
        RewriteRule ^(.*)$ /index.php?$1 [L]
    </Directory>


</VirtualHost>

nslookup

    $nslookup domainname.com

    Non-authoritative answer:
    Name:   domain.com
    Address: oldServerIP

    $nslookup stage.domainname.com

    Non-authoritative answer:
    Name:   stage.domainname.com
    Address: newServerIP

1 Answer 1

0

Did you just set this up and did you have the stage domain on the old server? What does a nslookup say for all domains? Do all records point to the correct server?

Seems to me more like a DNS-cache issue than an apache one.

1
  • I've added nslookup info above. I switched nameservers about 5 days ago. I've been folling around trying to get the subdomains configured for days. Sep 28, 2010 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .