Muti-site + Amazon EC2 + Amazon Cloudfront and no S3

Hello,

Currently, I have a test multi-site WordPress server set up with Cloudfront and no S3.

Tested ec2 domain and the site comes up fine. No issues.

Added the domain mapping plugin, added a subsite and the subsite domain works fine, but the primary blog domain does not work well. I can see the frontpage using the blog domain, but the links are pointed to the ec2 domain. I can however, manually replace the URL with the primary blog domain and the page/post will come up. Summary:

http://ec2-...compute-1.amazonaws.com works

http://mysecondaryblog.org/ works

http://myprimaryblog.org/ brings up site, but links are still pointing to http://ec2-...compute-1.amazonaws.com. I can do a db dump and replace those links, but not ideal.

wp-config.php:
define('DOMAIN_CURRENT_SITE', 'myprimaryblog.org')
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

db:
wp_options -> siteurl is set to http://myprimaryblog.org
wp_options -> home is set to http://ec2-...compute-1.amazonaws.com
wp_site -> 1 is set to http://ec2-...compute-1.amazonaws.com with path set to /
wp_blogs -> 1 is set to ec2-...compute-1.amazonaws.com with path set to /
wp_blogs -> 2 is set to ec2-...compute-1.amazonaws.com with path set to /secondaryblog/

Thank you.