Help: Virtualhost & globals setup

0 views
Skip to first unread message

Matt

unread,
Oct 30, 2009, 9:28:09 AM10/30/09
to Lovd by Less
I've got a home server that I use as a development environment, but I
like it to be visible and reachable by the internet. I use dynDNS.com
to get a free domain pointing at my home IP address, which my router
then bounces to my ubuntu machine

mmohon.is-a-geek.com

I checked, and have all of the passenger modules and such loaded in
the apach2.conf file.
I added a virtual host mmohon.is-a-geek.com which follows:

<VirtualHost mmohon.is-a-geek.com>
DocumentRoot "/var/www/lovdbyless/public"
ServerName mmohon.is-a-geek.com
</VirtualHost>

I have also tried

<VirtualHost *>
DocumentRoot "/var/www/lovdbyless/public"
ServerName mmohon.is-a-geek.com
</VirtualHost>

I've edited my /config/initializers/global_variables.rb to have

SITE = RAILS_ENV == 'production' ? 'mmohon.is-a-geek.com' : 'localhost:
3000'

The results
I cant get lovdbyless at mmohon.is-a-geek.com
I cant get lovdbyless at mmohon.is-a-geek.com:3000
From my laptop (not my server) I can get lovdbyless on
192.168.0.103:3000, but no CSS works
From my server I can get lovdbyless on localhost:3000, and CSS works
and looks perfect

I'm missing something and I've searched and searched for how to fix
it. So if this is a newb question I'm sorry.

Steven Bristol

unread,
Nov 1, 2009, 11:01:09 AM11/1/09
to lovdb...@googlegroups.com
http://mmohon.is-a-geek.com:3000/ loads an insoshi site. It looks like
you've got it all sorted out now.

cheers,
steven bristol

Matt

unread,
Nov 1, 2009, 11:38:21 AM11/1/09
to Lovd by Less
yeah....im playing with both of them. I liked lovdbyless better
though. How do I make plane mmohon-ia-a-geek.com load to the :3000
port without the user having to type it in?
> http://mmohon.is-a-geek.com:3000/loads an insoshi site. It looks like

Steven Bristol

unread,
Nov 2, 2009, 7:38:18 AM11/2/09
to lovdb...@googlegroups.com
On Sun, Nov 1, 2009 at 12:38 PM, Matt <mmo...@gmail.com> wrote:
>
> yeah....im playing with both of them. I liked lovdbyless better
> though.  How do I make plane mmohon-ia-a-geek.com load to the :3000
> port without the user having to type it in?
>


You can do port forwarding at your router, but it's probably easier to
run it under port 80. This is certainly what you want to do in
production. You should read a quick tutorial on running a rails app in
production mode, but here is what you can do for now (NOTE: this is
not proper for a production environment, because it can only handle
one request at a time):

#dev mode on port 80:
./script/server -p 80

#prod mode on port 80:
./script/server -p 80 -e production

cheers,
steven birstol

Reply all
Reply to author
Forward
0 new messages