List Info

Thread: Create a virtual host using Instant Rails 1.7




Create a virtual host using Instant Rails 1.7
user name
2007-05-24 15:47:08
Hi,
   I created a new rails application called demo using Instant Rails 1.7.  It runs at the URL http://localhost:3003/blog/

The applications that a packaged with the zip file, cookbook and typo are currenlty the two virtual hosts.  I can already run them using the following URLs
http://www.mycookbook.com and http://typo/
Now, I want to add my application demo as the third virtual host in development mode.
This application for example, could run on the URL http://www.mydemo.com/
What files do I need to modify to set this up?

Please help. ;
Thanks
Udai
Re: Create a virtual host using Instant Rails 1.7
user name
2007-05-24 16:03:51
On 5/24/07, udai kudikyala < udaikudikyalagmail.com">udaikudikyalagmail.com> wrote:
Hi,
&nbsp;  I created a new rails application called demo using Instant Rails 1.7.  It runs at the URL http://localhost:3003/blog/

The applications that a packaged with the zip file, cookbook and typo are currenlty the two virtual hosts.&nbsp; I can already run them using the following URLs
http://www.mycookbook.com and http://typo/
Now, I want to add my application demo as the third virtual host in development mode.
This application for example, could run on the URL http://www.mydemo.com/
What files do I need to modify to set this up?


Just pick an unused port (like 3008 or something), and configure your rails app to run there. Edit the apache config file (through the Instant Rails menus) and duplicate the section already in there for eith typo or the cookbook, and then change name and port to match your new app.

Finally edit you windows HOSTS file to map the new name to 127.0.0.1 (unless you already have your own DNS server running).

Curt
Re: Create a virtual host using Instant Rails 1.7
user name
2007-05-24 16:51:59
Hi,
&nbsp;  Thanks for the instant reply : ). 
THis is what I did
1. Under
Rails Applications --> Manage Rail Applications
I clicked on the demo (my application) check box and clicked on Configure Startup Mode button
In Configure Demo Window I set
&nbsp; Runtime mode text box : development
  Port: 3038
&nbsp; Then I clicked on Edit Apache Config button and added the following text
&lt;VirtualHost *>
&nbsp; &nbsp; ServerName www.mydemo.com
 ; &nbsp; ProxyPass / http://localhost:3028/
 &nbsp;  ProxyPassReverse / http://localhost:3028
</VirtualHost&gt;
Saved this file
&nbsp; Then I clicked on the Edit Window Host file and added the following line
&nbsp; &nbsp;   ; &nbsp; 127.0.0.1 www.mydemo.com
Saved this file and clicked OK button in Configue Demo Window
Then I Clicked on Start with Mongrel button in Rails Application Window.
Now, I opened IE and typed the URL : http://www.mydemo.com/
It showed me the default page (welcome Aboard Riding the Rails page).
I have to physically type http://www.mydemo.com/blog ; in order to see my application (scaffolding).  Blog is the controller for this application.
Now, the cookbook application seems to be redirecting to
This is not hapenning with my application though.&nbsp; I don't undersand.
Any help is appreciated.
Thanks again for your help.
&nbsp;
Udai
 
 
 
 
 
 
&nbsp;
&nbsp; 
 
On 5/24/07, Curt Hibbs < curt.hibbsgmail.com">curt.hibbsgmail.com> wrote:
On 5/24/07, udai kudikyala <gmail.com" target="_blank"> udaikudikyalagmail.com> wrote:
Hi,
   I created a new rails application called demo using Instant Rails 1.7.  It runs at the URL http://localhost:3003/blog/

The applications that a packaged with the zip file, cookbook and typo are currenlty the two virtual hosts.&nbsp; I can already run them using the following URLs
http://www.mycookbook.com and http://typo/
Now, I want to add my application demo as the third virtual host in development mode.
This application for example, could run on the URL http://www.mydemo.com/
What files do I need to modify to set this up?


Just pick an unused port (like 3008 or something), and configure your rails app to run there. Edit the apache config file (through the Instant Rails menus) and duplicate the section already in there for eith typo or the cookbook, and then change name and port to match your new app.

Finally edit you windows HOSTS file to map the new name to 127.0.0.1 (unless you already have your own DNS server running).

Curt

_______________________________________________
Instantrails-users mailing list
rubyforge.org"> Instantrails-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instantrails-users

Re: Create a virtual host using Instant Rails 1.7
country flaguser name
United States
2007-05-24 23:49:56
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On May 24, 2007, at 4:51 PM, udai kudikyala wrote:


> Now, the cookbook application seems to be redirecting
to
>    http://www.myco
okbook.com/recipe/list by just typing the URL  
> http://www.mycookbook.com
> This is not hapenning with my application though.  I
don't undersand.
> Any help is appreciated.
> Thanks again for your help.
>


That's the correct behavior. You have to specify the default
action  
via Rail's routes mechanism.  Look in the config/routes.rb
for one of  
the other applications, or look for docs on rails routing.

David Morton
Maia Mailguard http://www.maiamailguard
.com
mortondadgrmm.net



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGVmr3Uy30ODPkzl0RArtYAJwOtq1a9KExuyyFnf3xQ64OS1jTtACg
kk/Z
qS1L+t6U3PVwkkF99J+x7nI=
=pJz8
-----END PGP SIGNATURE-----
_______________________________________________
Instantrails-users mailing list
Instantrails-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instantrails-users


Re: Create a virtual host using Instant Rails 1.7
user name
2007-05-25 08:34:18
Thanks for pointing me in the right direction.
The cookbook application is using ; the default index.html  page to redirect to the required URL.
The Typo application is actually using rails routing (config/routes.rb) to invoke the controller and the action.
Well both mechanisms work. 
I really appreciate your help. ;

Udai


On 5/24/07, David Morton < mortondadgrmm.net"> mortondadgrmm.net> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On May 24, 2007, at 4:51 PM, udai kudikyala wrote:


&gt; Now, the cookbook application seems to be redirecting to
>&nbsp; &nbsp; http://www.mycookbook.com/recipe/list by just typing the URL
> http://www.mycookbook.com
> This is not hapenning with my application though.&nbsp; I don't undersand.
> Any help is appreciated.
> Thanks again for your help.
&gt;


That&#39;s the correct behavior. You have to specify the default action
via Rail's routes mechanism.  ;Look in the config/routes.rb for one of
the other applications, or look for docs on rails routing.

David Morton
Maia Mailguard http://www.maiamailguard.com
mortondadgrmm.net">mortondadgrmm.net



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGVmr3Uy30ODPkzl0RArtYAJwOtq1a9KExuyyFnf3xQ64OS1jTtACgkk/Z
qS1L+t6U3PVwkkF99J+x7nI=
=pJz8
-----END PGP SIGNATURE-----
_______________________________________________
Instantrails-users mailing list
Instantrails-usersrubyforge.org">Instantrails-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instantrails-users

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )