Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Sep 17, 2012 3:22 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
I am hosting several static sites on my Linode which I've been managing with Apache. Recently did I build a Rails app that that I spent all weekend trying to get deployed to a custom domain. I tried everything and finally was able to see some success after following a Rails Screencast including a Capistrano deploy using Nginx and Unicorn.

I ran the deploy script from my home machine and it deployed files to my Linode at the appropriate web address (yay!). However, it looks like there is conflict with Apache, and my site is not serving up on the server. The files are simply "directory listing" contents.

The site is: http://www.ohinaa.com

App code is all on Github: http://www.github.com/indie/serenity

I can post config files, if needed. Hopefully it's something obvious I'm missing because I've spent too much time in the problem, and can't see it. Any help will be greatly GREATLY appreciated.


Top
   
PostPosted: Mon Sep 17, 2012 3:32 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
If you're trying to run nginx and apache on the same IP and port then it's going to fail, only one service can run on each ip/port combination.

Either replace apache with nginx or use nginx to proxy requests to apache http://wiki.nginx.org/HttpProxyModule

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Mon Sep 17, 2012 5:38 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
Thanks so much for the reply. I'm thinking there's a third option, which is probably the most simple and easiest: add another IP addy. [Edit] Lol, I just tried to purchase one via my account management dashboard, and it was like, "sorry you need technical justification for a second IP address" :)


Top
   
PostPosted: Mon Sep 17, 2012 5:47 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
You probably won't get it. You need to justify a reason for having an additional IP, pretty much the only reasons are failover and ssl certificates. (Unless you're only using ipv6 which is unlikely).

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Mon Sep 17, 2012 5:48 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
Actually, I do have an SSL cert which was obtained specifically for this site . . . haven't done anything with it (yet) because I've not been able to deploy the site at all.


Top
   
PostPosted: Mon Sep 17, 2012 7:39 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
Scratch NGINX. Now accepting other ideas. I need to leave my live sites alone and re-building everything on Nginx is just not an option I have time for right now. I'm trying to focus my efforts on this ONE SITE to get it working, not messing with load balancers and other riffraff. I do not have time for distractions this month.

I need a concrete example of something that will work and allow me to get this Rails app (which was extraordinarily difficult in and of itself to get to work beautifully on locahost) live on the Internet. This should not be so difficult. Can the config/deploy.rb script be modified to work with Passenger? I have not been able to find anything that shows a working example of this.


Top
   
PostPosted: Mon Sep 17, 2012 9:03 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
I'd probably suggest that a quick, simple, distractionless approach would be to just get another Linode and use it for the new app. Completely avoids any possible collision between the new and old sites.

That can then buy you some time (without pressure due to the new site being unavailable) to look into figuring out how to integrate your older sites and the new site on a single system. I do suspect it'll be easiest to use nginx on the front end (since it runs your dynamic site which tends to require more server-specific configuration) and proxy the older requests back to Apache. If your older sites are truly static, it may be just as easy to let nginx handle them directly as well.

But in any case, there's no need to solve that issue as a precursor to at least getting your new site online.

-- David


Top
   
PostPosted: Mon Sep 17, 2012 9:52 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
I wish I could afford another Linode, but alas; there is a budget here, and I already prepaid my Linode for one year. Besides, that would be just SILLY, as my current Linode is running at something like 1 percent of capacity. To REQUIRE somebody like me to buy an entirely new Linode just to get another IP would be Evil.

I am sure that somebody somewhere has been able to figure out how to host mutiple static sites + one rails app with a Postgres DB on a single-server IP address managed by Apache. Passenger seemed kind of promising, but the Linode documentation on it is terrible and did not work.


Top
   
PostPosted: Tue Sep 18, 2012 9:18 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
There is a third option: run Nginx on a different port and configure Apache to serve as a reverse proxy to it using a ProxyPass directive or a rewrite rule with the P flag.

Here's an example of setting up an Apache reverse proxy for a non-Rails application; you may be able to find a guide more specific to your needs. Note that Nginx is usually used in front of Apache, not the other way around, so a lot of your search results will be for that configuration.


Top
   
PostPosted: Sun Sep 23, 2012 2:47 pm 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
..


Last edited by indie on Sun Oct 07, 2012 10:59 am, edited 1 time in total.

Top
   
 Post subject: Dear Nginx
PostPosted: Sun Oct 07, 2012 10:58 am 
Offline
Senior Newbie

Joined: Tue Jul 10, 2012 12:50 pm
Posts: 7
O.M.G., I finally, finally, finally got it working!

Nginx was a terrible idea.

=============================================
Dear Nginx:

You are far too Herculean for my tastes. Why can't you just let everybody do their own thing? Why do you try to run the whole show? I wasted so much precious time trying to get you to play nice, but that's just not something you seem to know how to do.

You're just too bossy. You shall be banished from my Linodes forever.


Love,
indie
=============================================

I ended up using Apache + a bleeding-edge "experimental" version of Passenger cloned from Github.

Will post details later. In the meantime, lemme just put this out there: I've learned the hard way to not listen to advice on forums, and just work with what I know.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group