[Chugalug] Amazon EC2 woes

Jon Stanford jbirdvegas at aokp.co
Thu Aug 22 07:34:17 UTC 2013


well I managed to create a new AMI; dropped the old instance and booted the new instance. After reassociating the elastic IP address with the new instance I was able to ssh into the instance... unfortunately the Redirect statement seems to have no effect, even after I ran: 

sudo /opt/bitnami/ctlscript.sh restart 

here is what I have for my config (/opt/bitnami/apps/gitlab/conf/gitlab.conf) 

bitnami at ip-10-164-73-31:/opt/bitnami$ cat apps/gitlab/conf/gitlab.conf 
Alias /gitlab /opt/bitnami/apps/gitlab/htdocs/public 

<Directory "/opt/bitnami/apps/gitlab/htdocs/public"> 
Options -MultiViews 
allow from all 
Redirect permanent / http://jbirdvegas.org/gitlab/ 
PassengerUser git 
PassengerGroup git 

</Directory> 

<Location /gitlab> 
SetEnv RAILS_RELATIVE_URL_ROOT "/gitlab" 
SetEnv MAGIC "/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9.1/ext/charlock_holmes/dst/share/misc/magic.mgc" 
PassengerAppRoot "/opt/bitnami/apps/gitlab/htdocs" 
</Location> 

PassengerPreStart http://127.0.0.1:80/gitlab 

Adding the Redirect causes reclusive gitlabs :( 
http://jbirdvegas.org/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/gitlab/ 

My first thought was to remove the /gitlab from PassengerPreStart... but then the application becomes 404 
and after a little googling I see why http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPreStart 

Am I missing something? 

----- Original Message -----

From: "Jon Stanford" <jbirdvegas at aokp.co> 
To: "Chattanooga Unix Gnu Android Linux Users Group" <chugalug at chugalug.org> 
Sent: Thursday, August 22, 2013 12:48:33 AM 
Subject: Re: [Chugalug] Amazon EC2 woes 


Ok I'm going to try creating a new AMI 

about the authorized_keys file ... I'm kinda up the creek on that one as I'd need to ssh into the instance in order to modify the file :( 

again (and I can't say this enough) thanks guys! I'll let you know how it goes 
----- Original Message -----

From: "Sean Brewer" <seabre986 at gmail.com> 
To: "Chattanooga Unix Gnu Android Linux Users Group" <chugalug at chugalug.org> 
Sent: Thursday, August 22, 2013 12:44:45 AM 
Subject: Re: [Chugalug] Amazon EC2 woes 

You can create an AMI from the running instance, and create a new instance from that AMI with your new key: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html?r=8284 


On Thu, Aug 22, 2013 at 12:41 AM, wes < wes at the-wes.com > wrote: 




<blockquote>




jbird at jbird:~$ chmod 400 ~/Downloads/laptop.pem 
jbird at jbird:~$ ssh -i ~/Downloads/laptop.pem ubuntu at ec2-54-235-163-94.compute-1.amazonaws.com 
Permission denied (publickey). 
jbird at jbird:~$ ssh -i ~/Downloads/laptop.pem JBirdVegas at ec2-54-235-163-94.compute-1.amazonaws.com 
Permission denied (publickey). 
jbird at jbird:~$ ssh -i ~/Downloads/laptop.pem root at ec2-54-235-163-94.compute-1.amazonaws.com 
Permission denied (publickey). 



you also need to enable the public key in the authorized_keys file. the fact that the filename ends in .pem makes me wonder where you got it. 


<blockquote>



I'm on a different laptop and don't have the original key used to generate the instance... am I screwed? Should I just dump this instance and make a new one? (it wouldn't be a huge pain I'd just have to email a couple users but nothing important is hosted there yet) 

</blockquote>

Yup, you're screwed. The easiest solution is indeed to nuke it and start over. There is a way to recover but it's likely more work than it's worth in your situation. 

-wes 

_______________________________________________ 
Chugalug mailing list 
Chugalug at chugalug.org 
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug 


</blockquote>



_______________________________________________ 
Chugalug mailing list 
Chugalug at chugalug.org 
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://chugalug.org/pipermail/chugalug/attachments/20130822/df461c47/attachment.html>


More information about the Chugalug mailing list