/srv/irclogs.ubuntu.com/2010/07/20/#ubuntu-ec2.txt

=== erichammond1 is now known as erichammond
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
flaccidi see some images set up /etc/hosts like 127.0.0.1   domU-12-31-38-00-95-65.compute-1.internal localhost04:37
flaccidlocalhost.localdomain04:37
flaccidis this a good or bad practice? (as opposed to just1 27.0.0.1   localhost   localhost.localdomain)04:39
=== dendrobates is now known as dendro-afk
flaccidyeah the .internal address should be the internal 10. IP05:22
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
l1234hello.  anyone around?16:20
flaccidno16:21
l1234well thats too bad.16:21
l1234I'm trying to setup a subdomain of my ec2 site, and this might be a #apache question16:22
flaccidcool16:22
l1234any chance you'd be willing to help me out?16:22
l1234i think I have the virtualhost settings correct in the 000-default file16:22
l1234but its not working16:22
flaccidenter #httpd and enter, NameVirtualHost16:22
l1234except I'm on webchat.freenode which they ban16:22
flaccidreally16:23
l1234yes.16:23
flaccidso whats the prob16:23
flaccidpaste the config..16:23
flaccidwell the vhost at least16:23
l1234<VirtualHost *:80> ServerName ec2.amazonaws.com DocumentRoot /var/www ServerAlias qa.ec2.compute-1.amazonaws.com </VirtualHost>  <VirtualHost *:80> ServerName ec2.amazonaws.com DocumentRoot /var/www2 ServerAlias qa2.ec2.amazonaws.com </VirtualHost>16:24
l1234sorry it stripped the spacing out16:24
l1234and i did a crappy job and stripped the compute-1 from the 2nd entry16:25
l1234basically when I go to ec2.amazonaws.com it works fine(ccurrently pointed to /var/www)16:25
l1234but the subdomains don't seem to work at all16:25
flaccidyou own amazonaws.com ?16:26
l1234no16:26
l1234lol16:26
l1234i just stripped out our info from the file16:27
l1234before I pasted it in here16:27
flaccidso you don't even know what the directives mean?16:27
flaccidand you can't google?16:27
l1234i've tried googling16:27
flaccidall you need is ServerName qa.ec2.compute-1.amazonaws.com16:27
l1234http://httpd.apache.org/docs/2.0/vhosts/examples.html#purename  and http://www.howtoforge.com/forums/showthread.php?t=2316:27
flaccidno aliases16:27
l1234so just servername and docroot?16:28
l1234lemme try16:28
flaccidi did not mention DocumentRoot.16:28
l1234how would it know where to get the data?16:28
flaccidthe first link you gave me doesn't even show using ServerAlias16:28
flaccidDocumentRoot /var/ww16:29
flaccid*w16:29
flaccidyou also shouldn't create /var/www2 :)16:29
l1234i'm using random dir names16:29
l1234obviously www2 is a crappy directory name16:29
flaccidso anyway16:29
flaccidas long as you have Listen 80 and NameVirtualHost *:8016:30
flaccidthe solution i advised is the go16:30
l1234so like this16:30
l1234<VirtualHost *:80> ServerName qa.ec2.compute-1.amazonaws.com DocumentRoot /var/www </VirtualHost>16:30
l1234?16:30
flaccidyeah16:30
flaccidof course qa.ec2.compute-1.amazonaws.com is foobar16:31
l1234right i need to change it to our proper domain name16:31
l1234still doesn't work16:31
flaccidstill doesn't work aint going to help16:31
l1234a coworker said I should change my local hosts file16:31
flaccidcan you explain16:32
l1234which makes no sense to me.16:32
l1234404's when I go to qa.ec216:32
flaccidthats better16:32
flaccidcheck the apache logs16:33
flaccidfirst check the access log to ensure you are hitting the server16:33
flaccidthen the error log16:33
flaccidalso ensure the vhost configuration is correct in apachectl -S16:33
l1234neither apache or error have any info in there16:34
flaccidif nothing in access log then you probably are not hitting the right server16:35
flaccidcheck the server signature against curl http://localhost/16:35
l1234but -S talks about compute-1.internal16:35
flaccidso that would probably come back to dns16:35
l1234whereas the one I setup seems to point to amazaws.com ?16:36
flaccidshow me16:36
l1234computer-1.amazonaws.com that is16:36
flaccidok so you shouldn't be touching/changing the default vhost16:38
flaccidyou need to create new ones and then enable them with a2ensite16:38
flaccidplease don't pm me again16:39
l1234sorry16:39
l1234http://apache.pastebin.com/qfHn1w5A  better?16:39
flaccidok so what i said above16:40
flaccidyou also don't need sudo for apache2ctl16:40
flaccidand yes of course your dns and /etc/hosts needs to be correct subsequent to that16:41
=== dendrobates is now known as dendro-afk
flaccidi'm about to go to bed16:48
l1234http://apache.pastebin.com/tbng2d6i16:49
l1234how about this now?16:49
flaccidyeah but you still have one of them in /etc/apache2/sites-enabled/000-default16:51
flaccidthus its default to the local fqdn16:51
l1234have one of what?16:52
flaccidthe vhosts16:52
l1234the vhost info?16:52
l1234oh ok16:52
l1234one sec16:52
flaccidand qa.ec2-184-73-97-66.compute-1.amazonaws.com has to resolve to the client16:52
flaccidyou don't have authority on this domain so its either hijack in local dns or add to /etc/hosts16:53
flaccidsorry, to the client = for the client16:53
flaccidas in the computer the web browser is on16:54
flaccidalso on the server for local access16:54
l1234hrm16:55
l1234ok16:55
l1234damn16:55
l1234was hoping to avoid that16:55
flaccidaws is not a dns provider16:55
l1234aaah ok16:55
l1234hrm16:55
l1234damn16:55
flaccidnon elastics IPs are also dynamic16:55
flaccidand technically elastic IPs are not marked as static in the ip register16:56
flaccidmoral to the story, get dns16:56
l1234ok16:57
l1234thanks16:57
flaccidnp16:57
flaccidoh but the public ip of the instance does not change in the instance lifetime16:58
flaccidsidenote..16:58
flaccidim gone.17:06
flaccidthanks for the help heh17:06
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
=== dendrobates is now known as dendro-afk
=== dendro-afk is now known as dendrobates
=== ajaya_ is now known as ajaya

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!