Hi Markus. Where did you locate the api.cr.am.conf file
On Mar 28, 8:36 pm, markus albe <[email protected]> wrote: > Mike, > > Thanks for your kind answer :-) I finally figured out the right way > to do it: creating a new application in scalr, and using the same farm > (realized that after > readinghttp://groups.google.com/group/scalr-discuss/browse_thread/thread/cf2...). > I had a small problem after that, since apache was complaining: > > r...@ec2-67-202-49-44:/etc/apache2/sites-available# /etc/init.d/ > apache2 restart > * Restarting web server > apache2 > apache2: apr_sockaddr_info_get() failed for > ec2-67-202-49-44.compute-1.amazonaws.com > apache2: Could not reliably determine the server's fully qualified > domain name, using 127.0.0.1 for ServerName > [Sat Mar 28 20:18:49 2009] [warn] NameVirtualHost *:80 has no > VirtualHosts > apache2: apr_sockaddr_info_get() failed for > ec2-67-202-49-44.compute-1.amazonaws.com > apache2: Could not reliably determine the server's fully qualified > domain name, using 127.0.0.1 for ServerName > [Sat Mar 28 20:18:59 2009] [warn] NameVirtualHost *:80 has no > VirtualHosts > > I kept having the same problem: accessing api.cr.am returned cr.am's > content... After struggling for a few hours, I thought that I had to > only leave "NameVirtualHost *" (without the :80), and then define all > virtual hosts like "VirtualHost *" (also without the :80) When I did > that, apache complained again, but with a slight difference: > > r...@ec2-67-202-49-44:/etc/apache2/sites-available# /etc/init.d/ > apache2 restart > * Restarting web server > apache2 > apache2: apr_sockaddr_info_get() failed for > ec2-67-202-49-44.compute-1.amazonaws.com > apache2: Could not reliably determine the server's fully qualified > domain name, using 127.0.0.1 for ServerName > [Sat Mar 28 20:25:50 2009] [warn] NameVirtualHost *:0 has no > VirtualHosts > apache2: apr_sockaddr_info_get() failed for > ec2-67-202-49-44.compute-1.amazonaws.com > apache2: Could not reliably determine the server's fully qualified > domain name, using 127.0.0.1 for ServerName > [Sat Mar 28 20:26:00 2009] [warn] NameVirtualHost *:0 has no > VirtualHosts > > So there, I realized the api.cr.am.conf was being read before the > default.conf, so I removed the original symlink from sites-enabled, > and re-linked as 001-api.cr.am.conf, and now everything works > perfectly. > > Thanks again for your time! > > Regards, > > markus > > On Mar 27, 7:28 pm, mikeytag <[email protected]> wrote: > > > Hi Markus, > > > Your issue stems from the fact that you did a CNAME record. CNAME > > records act as pointers to other servers so in effect the browser is > > redirected to cr.am when they go to api.cr.am. The www server is only > > ever seeing cr.am come in because DNS redirects the visitor before it > > gets to your server. What you want is an A record for api.cr.am that > > points to your www server. I know scalr has a %hostname% variable, > > but is there a %hostip% variable to use in this case? > > > Mike > > > On Mar 27, 3:21 pm, markus albe <[email protected]> wrote: > > > > Hi, > > > > I've been trying to setup asubdomainfor our farm, and so far it > > > seems I haven't had luck. > > > > I added an entry in the application's DNS zone, and also added a > > > default DNS record, but still nothing. > > > > Our main domain is cr.am, and the entry in the app's DNS zone was > > > filled like this: > > > Domain: api.cr.am > > > TTL: 14400 > > > IN: CNAME > > > Record Value: cr.am > > > > And the entry in the default DNS records was configured like this: > > > Domain: api.%hostname% > > > TTL: 14400 > > > IN: CNAME > > > Record Value: %hostname% > > > > I have setup a vhost in apache like this: > > > > <VirtualHost *> > > > ServerName api.cr.am > > > DocumentRoot /var/www/html/api > > > > ErrorLog /var/log/apache2/cram_api.error.log > > > CustomLog /var/log/apache2/cram_api.access.log combined > > > ServerSignature On > > > > <Directory "/var/www/html/api"> > > > Options -Indexes FollowSymLinks MultiViews > > > AllowOverride Options AuthConfig FileInfo > > > Order allow,deny > > > allow from all > > > > RewriteEngine On > > > # RewriteBase / > > > RewriteCond %{REQUEST_FILENAME} -s [OR] > > > RewriteCond %{REQUEST_FILENAME} -l [OR] > > > RewriteCond %{REQUEST_FILENAME} -d > > > RewriteRule ^.*$ - [NC,L] > > > > ## route all the 404's to index.php. > > > RewriteRule ^.*$ /index.php [QSA,NC,L] > > > </Directory> > > > </VirtualHost> > > > > and apache's default.conf looks more or less like > > > > NameVirtualHost *:80 > > > <VirtualHost *:80> > > > ServerAdmin webmas...@localhost > > > > DocumentRoot /var/www/html/home/ > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > <Directory /var/www/html/home/> > > > Options -Indexes FollowSymLinks MultiViews > > > AllowOverride Options AuthConfig FileInfo > > > Order allow,deny > > > allow from all > > > </Directory> > > > . > > > , > > > , > > > </VirtualHost> > > > > We have a www role and an app role running, and when I go to > > > api.cr.am, I always see the default site, and the separate access log > > > shows that the api.cr.am vhost isn't receiving the requests... any > > > idea why is this happening? > > > > DNS related stuff is not my strong part, so any help will be more than > > > welcome :-) > > > > oh, and here's what dig shows to me (not sure if this is of any help, > > > so forgive me if it's not :-P :-)) > > > > For cr.am: > > > > r...@lilith:/# dig -t any cr.am > > > ; <<>> DiG 9.4.2-P1 <<>> -t any cr.am > > > ;; global options: printcmd > > > ;; Got answer: > > > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9944 > > > ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 > > > > ;; QUESTION SECTION: > > > ;cr.am. IN ANY > > > > ;; ANSWER SECTION: > > > cr.am. 2151 IN NS ns1.scalr.net. > > > cr.am. 2151 IN NS ns2.scalr.net. > > > > ;; AUTHORITY SECTION: > > > cr.am. 2151 IN NS ns1.scalr.net. > > > cr.am. 2151 IN NS ns2.scalr.net. > > > > ;; ADDITIONAL SECTION: > > > ns1.scalr.net. 147019 IN A 174.132.108.66 > > > ns2.scalr.net. 147019 IN A 174.132.97.130 > > > > And for api.cr.am > > > > r...@lilith:/# dig -t any api.cr.am > > > ; <<>> DiG 9.4.2-P1 <<>> -t any api.cr.am > > > ;; global options: printcmd > > > ;; Got answer: > > > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65299 > > > ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 > > > > ;; QUESTION SECTION: > > > ;api.cr.am. IN ANY > > > > ;; ANSWER SECTION: > > > api.cr.am. 13710 IN CNAME cr.am. > > > > ;; AUTHORITY SECTION: > > > cr.am. 2147 IN NS ns1.scalr.net. > > > cr.am. 2147 IN NS ns2.scalr.net. > > > > ;; ADDITIONAL SECTION: > > > ns1.scalr.net. 147015 IN A 174.132.108.66 > > > ns2.scalr.net. 147015 IN A 174.132.97.130 > > > > and here's the result when I query ns1.scalr.net > > > > r...@lilith:/# dig @ns1.scalr.net -t any cr.am > > > > ; <<>> DiG 9.4.2-P1 <<>> @ns1.scalr.net -t any cr.am > > > ; (1 server found) > > > ;; global options: printcmd > > > ;; Got answer: > > > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31621 > > > ;; flags: qr aa rd; QUERY: 1, ANSWER: 9, AUTHORITY: 0, ADDITIONAL: 2 > > > ;; WARNING: recursion requested but not available > > > > ;; QUESTION SECTION: > > > ;cr.am. IN ANY > > > > ;; ANSWER SECTION: > > > cr.am. 14400 IN MX 30 > > > ALT2.ASPMX.L.GOOGLE.COM. > > > cr.am. 14400 IN MX 10 ASPMX.L.GOOGLE.COM. > > > cr.am. 14400 IN MX 40 > > > ASPMX2.GOOGLEMAIL.COM. > > > cr.am. 14400 IN MX 50 > > > ASPMX3.GOOGLEMAIL.COM. > > > cr.am. 14400 IN MX 20 > > > ALT1.ASPMX.L.GOOGLE.COM. > > > cr.am. 90 IN A 75.101.207.96 > > > cr.am. 14400 IN SOA ns1.scalr.net. > > > admin.scalr.net. 2009032717 14400 7200 86400 300 > > > cr.am. 14400 IN NS ns2.scalr.net. > > > cr.am. 14400 IN NS ns1.scalr.net. > > > > ;; ADDITIONAL SECTION: > > > ns1.scalr.net. 3600 IN A 174.132.108.66 > > > ns2.scalr.net. 3600 IN A 174.132.97.130 > > > > and... > > > > r...@lilith:/# dig @ns1.scalr.net -t any api.cr.am > > > > ; <<>> DiG 9.4.2-P1 <<>> @ns1.scalr.net -t any api.cr.am > > > ; (1 server found) > > > ;; global options: printcmd > > > ;; Got answer: > > > ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10632 > > > ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 > > > ;; WARNING: recursion requested but not available > > > > ;; QUESTION SECTION: > > > ;api.cr.am. IN ANY > > > > ;; AUTHORITY SECTION: > > > cr.am. 300 IN SOA ns1.scalr.net. > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "scalr-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/scalr-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
