=== 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 | ||
flaccid | i see some images set up /etc/hosts like 127.0.0.1 domU-12-31-38-00-95-65.compute-1.internal localhost | 04:37 |
---|---|---|
flaccid | localhost.localdomain | 04:37 |
flaccid | is 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 | ||
flaccid | yeah the .internal address should be the internal 10. IP | 05: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 | ||
l1234 | hello. anyone around? | 16:20 |
flaccid | no | 16:21 |
l1234 | well thats too bad. | 16:21 |
l1234 | I'm trying to setup a subdomain of my ec2 site, and this might be a #apache question | 16:22 |
flaccid | cool | 16:22 |
l1234 | any chance you'd be willing to help me out? | 16:22 |
l1234 | i think I have the virtualhost settings correct in the 000-default file | 16:22 |
l1234 | but its not working | 16:22 |
flaccid | enter #httpd and enter, NameVirtualHost | 16:22 |
l1234 | except I'm on webchat.freenode which they ban | 16:22 |
flaccid | really | 16:23 |
l1234 | yes. | 16:23 |
flaccid | so whats the prob | 16:23 |
flaccid | paste the config.. | 16:23 |
flaccid | well the vhost at least | 16: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 |
l1234 | sorry it stripped the spacing out | 16:24 |
l1234 | and i did a crappy job and stripped the compute-1 from the 2nd entry | 16:25 |
l1234 | basically when I go to ec2.amazonaws.com it works fine(ccurrently pointed to /var/www) | 16:25 |
l1234 | but the subdomains don't seem to work at all | 16:25 |
flaccid | you own amazonaws.com ? | 16:26 |
l1234 | no | 16:26 |
l1234 | lol | 16:26 |
l1234 | i just stripped out our info from the file | 16:27 |
l1234 | before I pasted it in here | 16:27 |
flaccid | so you don't even know what the directives mean? | 16:27 |
flaccid | and you can't google? | 16:27 |
l1234 | i've tried googling | 16:27 |
flaccid | all you need is ServerName qa.ec2.compute-1.amazonaws.com | 16:27 |
l1234 | http://httpd.apache.org/docs/2.0/vhosts/examples.html#purename and http://www.howtoforge.com/forums/showthread.php?t=23 | 16:27 |
flaccid | no aliases | 16:27 |
l1234 | so just servername and docroot? | 16:28 |
l1234 | lemme try | 16:28 |
flaccid | i did not mention DocumentRoot. | 16:28 |
l1234 | how would it know where to get the data? | 16:28 |
flaccid | the first link you gave me doesn't even show using ServerAlias | 16:28 |
flaccid | DocumentRoot /var/ww | 16:29 |
flaccid | *w | 16:29 |
flaccid | you also shouldn't create /var/www2 :) | 16:29 |
l1234 | i'm using random dir names | 16:29 |
l1234 | obviously www2 is a crappy directory name | 16:29 |
flaccid | so anyway | 16:29 |
flaccid | as long as you have Listen 80 and NameVirtualHost *:80 | 16:30 |
flaccid | the solution i advised is the go | 16:30 |
l1234 | so like this | 16:30 |
l1234 | <VirtualHost *:80> ServerName qa.ec2.compute-1.amazonaws.com DocumentRoot /var/www </VirtualHost> | 16:30 |
l1234 | ? | 16:30 |
flaccid | yeah | 16:30 |
flaccid | of course qa.ec2.compute-1.amazonaws.com is foobar | 16:31 |
l1234 | right i need to change it to our proper domain name | 16:31 |
l1234 | still doesn't work | 16:31 |
flaccid | still doesn't work aint going to help | 16:31 |
l1234 | a coworker said I should change my local hosts file | 16:31 |
flaccid | can you explain | 16:32 |
l1234 | which makes no sense to me. | 16:32 |
l1234 | 404's when I go to qa.ec2 | 16:32 |
flaccid | thats better | 16:32 |
flaccid | check the apache logs | 16:33 |
flaccid | first check the access log to ensure you are hitting the server | 16:33 |
flaccid | then the error log | 16:33 |
flaccid | also ensure the vhost configuration is correct in apachectl -S | 16:33 |
l1234 | neither apache or error have any info in there | 16:34 |
flaccid | if nothing in access log then you probably are not hitting the right server | 16:35 |
flaccid | check the server signature against curl http://localhost/ | 16:35 |
l1234 | but -S talks about compute-1.internal | 16:35 |
flaccid | so that would probably come back to dns | 16:35 |
l1234 | whereas the one I setup seems to point to amazaws.com ? | 16:36 |
flaccid | show me | 16:36 |
l1234 | computer-1.amazonaws.com that is | 16:36 |
flaccid | ok so you shouldn't be touching/changing the default vhost | 16:38 |
flaccid | you need to create new ones and then enable them with a2ensite | 16:38 |
flaccid | please don't pm me again | 16:39 |
l1234 | sorry | 16:39 |
l1234 | http://apache.pastebin.com/qfHn1w5A better? | 16:39 |
flaccid | ok so what i said above | 16:40 |
flaccid | you also don't need sudo for apache2ctl | 16:40 |
flaccid | and yes of course your dns and /etc/hosts needs to be correct subsequent to that | 16:41 |
=== dendrobates is now known as dendro-afk | ||
flaccid | i'm about to go to bed | 16:48 |
l1234 | http://apache.pastebin.com/tbng2d6i | 16:49 |
l1234 | how about this now? | 16:49 |
flaccid | yeah but you still have one of them in /etc/apache2/sites-enabled/000-default | 16:51 |
flaccid | thus its default to the local fqdn | 16:51 |
l1234 | have one of what? | 16:52 |
flaccid | the vhosts | 16:52 |
l1234 | the vhost info? | 16:52 |
l1234 | oh ok | 16:52 |
l1234 | one sec | 16:52 |
flaccid | and qa.ec2-184-73-97-66.compute-1.amazonaws.com has to resolve to the client | 16:52 |
flaccid | you don't have authority on this domain so its either hijack in local dns or add to /etc/hosts | 16:53 |
flaccid | sorry, to the client = for the client | 16:53 |
flaccid | as in the computer the web browser is on | 16:54 |
flaccid | also on the server for local access | 16:54 |
l1234 | hrm | 16:55 |
l1234 | ok | 16:55 |
l1234 | damn | 16:55 |
l1234 | was hoping to avoid that | 16:55 |
flaccid | aws is not a dns provider | 16:55 |
l1234 | aaah ok | 16:55 |
l1234 | hrm | 16:55 |
l1234 | damn | 16:55 |
flaccid | non elastics IPs are also dynamic | 16:55 |
flaccid | and technically elastic IPs are not marked as static in the ip register | 16:56 |
flaccid | moral to the story, get dns | 16:56 |
l1234 | ok | 16:57 |
l1234 | thanks | 16:57 |
flaccid | np | 16:57 |
flaccid | oh but the public ip of the instance does not change in the instance lifetime | 16:58 |
flaccid | sidenote.. | 16:58 |
flaccid | im gone. | 17:06 |
flaccid | thanks for the help heh | 17: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!