shodhan
2005-Oct-21 09:53 UTC
[Instantrails-users] [NewBie]Access RailsApp from different computer
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi<br>
InstantRails works perfectly fine on my computer after i make the
following changes in the configuration files<br>
<br>
modified start_scgi to include -h option<br>
<blockquote>..\..\ruby\bin\ruby.exe script\scgi_rails start -h
my.ip.add.ress -p 9999 -e production -D<br>
</blockquote>
modified hosts to include<br>
<blockquote>my.ip.addr.ess
<a
class="moz-txt-link-abbreviated"
href="http://www.myApp.com">www.myApp.com</a><br>
</blockquote>
modified httpd.conf, (modified cookbook virtualhost)<br>
<blockquote><VirtualHost *><br>
ServerName <a
class="moz-txt-link-abbreviated"
href="http://www.myApp.com">www.myApp.com</a><br>
# handle all requests through SCGI<br>
SCGIMount / my.ip.add.ress:9999<br>
DocumentRoot
${path}/rails_apps/myApp/public<br>
<Directory
${path}/rails_apps/myApp/public><br>
Options
+FollowSymLinks<br>
Order
allow,deny<br>
allow
from all<br>
</Directory><br>
AddDefaultCharset utf-8<br>
ErrorDocument 500 /500.html<br>
ErrorDocument 404 /404.html<br>
# matches locations with a dot following at least
one more
characters,<br>
# that is, things like
*.html, *.css, *.js, which should be
delivered<br>
# directly from the filesystem. Also matches the
following<br>
# subdirectories: images, javascript(s),
stylesheets<br>
<LocationMatch
^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)><br>
#
don''t handle those with SCGI<br>
SCGIHandler Off<br>
</LocationMatch><br>
<LocationMatch "^/$"><br>
#
don''t handle just / with SCGI<br>
SCGIHandler Off<br>
</LocationMatch><br>
</VirtualHost><br>
<br>
</blockquote>
Once i start scgi myApp is up at <a
class="moz-txt-link-abbreviated"
href="http://www.myApp.com">www.myApp.com</a><br>
Unfortunately the same is not accessible from a different computer. <br>
So the question is 1) is this configuration right, and 2) is this the
onnly configuration required to make my app accessible to the other
computers<br>
many thanx in advance<br>
shodhan<br>
ps: if i try telnet my.ip.add.ress 9999 from another machine, it turns
out to be sucessfull<br>
</body>
</html>
Curt Hibbs
2005-Oct-21 12:46 UTC
[Instantrails-users] [NewBie]Access RailsApp from different computer
By adding www.myapp.com <http://www.myapp.com> to your hosts file you are faking a domain name. This is really just intended for development purposes. To be accessible from other machines you would need to register that domain name so that it would appear inthe public DNS system. However, if you have just a few machines that you want to have access to your app for testign purposes, then they, too, can add the same entry to their hosts file and it will work as long as you are using a real ip number (using 127.0.0.1 <http://127.0.0.1> will not work because that always means the local machine). Curt On 10/21/05, shodhan <shodhan_sheth at persistent.co.in> wrote:> > Hi > InstantRails works perfectly fine on my computer after i make the > following changes in the configuration files > > modified start_scgi to include -h option > > ..\..\ruby\bin\ruby.exe script\scgi_rails start -h my.ip.add.ress -p 9999 > -e production -D > > modified hosts to include > > my.ip.addr.ess www.myApp.com <http://www.myApp.com> > > modified httpd.conf, (modified cookbook virtualhost) > > <VirtualHost *> > ServerName www.myApp.com <http://www.myApp.com> > # handle all requests through SCGI > SCGIMount / my.ip.add.ress:9999 > DocumentRoot ${path}/rails_apps/myApp/public > <Directory ${path}/rails_apps/myApp/public> > Options +FollowSymLinks > Order allow,deny > allow from all > </Directory> > AddDefaultCharset utf-8 > ErrorDocument 500 /500.html > ErrorDocument 404 /404.html > # matches locations with a dot following at least one more characters, > # that is, things like *.html, *.css, *.js, which should be delivered > # directly from the filesystem. Also matches the following > # subdirectories: images, javascript(s), stylesheets > <LocationMatch > ^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)> > # don''t handle those with SCGI > SCGIHandler Off > </LocationMatch> > <LocationMatch "^/$"> > # don''t handle just / with SCGI > SCGIHandler Off > </LocationMatch> > </VirtualHost> > > Once i start scgi myApp is up at www.myApp.com <http://www.myApp.com> > Unfortunately the same is not accessible from a different computer. > So the question is 1) is this configuration right, and 2) is this the > onnly configuration required to make my app accessible to the other > computers > many thanx in advance > shodhan > ps: if i try telnet my.ip.add.ress 9999 from another machine, it turns out > to be sucessfull > > _______________________________________________ > Instantrails-users mailing list > Instantrails-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/instantrails-users > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20051021/63d3e894/attachment-0001.htm
E Gard
2005-Oct-22 08:28 UTC
[Instantrails-users] [NewBie]Access RailsApp from different computer
Hi Shodhan,
I don''t know what kind of network setup you have, but
I''m using a linksys router with DDNS (See DynDNS at
www.dyndns.org).
Here is my change:
<VirtualHost *>
#### Salted ####
ServerName x2egard.dyndns.org
The DynDNS site let''s you create the above name and
maps it to your router''s IP address (no charge for the
service, it''s free!). My router than forwards port 80
(Apache) to a machine on my local network.
I browse to http://x2egard.dyndns.org/ and get the
salted rails app from any internet connected browser.
Ed
--- shodhan <shodhan_sheth at persistent.co.in> wrote:
---------------------------------
Hi
InstantRails works perfectly fine on my computer after
i make thefollowing changes in the configuration files
modified start_scgi to include -h option
..\..\ruby\bin\ruby.exe script\scgi_rails start
-hmy.ip.add.ress -p 9999 -e production -D
modified hosts to include
my.ip.addr.ess www.myApp.com
modified httpd.conf, (modified cookbook virtualhost)
<VirtualHost *>
ServerName www.myApp.com
# handle all requests through SCGI
SCGIMount / my.ip.add.ress:9999
DocumentRoot ${path}/rails_apps/myApp/public
<Directory ${path}/rails_apps/myApp/public>
Options +FollowSymLinks
Order allow,deny
allow from all
</Directory>
AddDefaultCharset utf-8
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
# matches locations with a dot following at least
one morecharacters,
# that is, things like *.html, *.css, *.js,
which should bedelivered
# directly from the filesystem. Also matches the
following
# subdirectories: images, javascript(s),
stylesheets
<LocationMatch^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)>
# don''t handle those with SCGI
SCGIHandler Off
</LocationMatch>
<LocationMatch "^/$">
# don''t handle just / with SCGI
SCGIHandler Off
</LocationMatch>
</VirtualHost>
Once i start scgi myApp is up at www.myApp.com
Unfortunately the same is not accessible from a
different computer.
So the question is 1) is this configuration right, and
2) is this theonnly configuration required to make my
app accessible to the othercomputers
many thanx in advance
shodhan
ps: if i try telnet my.ip.add.ress 9999 from another
machine, it turnsout to be sucessfull> _______________________________________________
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
>
http://rubyforge.org/mailman/listinfo/instantrails-users>
__________________________________
Yahoo! Mail - PC Magazine Editors'' Choice 2005
http://mail.yahoo.com
shodhan
2005-Oct-22 12:42 UTC
[Instantrails-users] [NewBie]Access RailsApp from different computer
Hi thanks(Curt and Ed) shodhan E Gard wrote:>Hi Shodhan, > >I don''t know what kind of network setup you have, but >I''m using a linksys router with DDNS (See DynDNS at >www.dyndns.org). > >Here is my change: > ><VirtualHost *> > #### Salted #### > ServerName x2egard.dyndns.org > >The DynDNS site let''s you create the above name and >maps it to your router''s IP address (no charge for the >service, it''s free!). My router than forwards port 80 >(Apache) to a machine on my local network. > >I browse to http://x2egard.dyndns.org/ and get the >salted rails app from any internet connected browser. > >Ed > > >--- shodhan <shodhan_sheth at persistent.co.in> wrote: > > >--------------------------------- > Hi >InstantRails works perfectly fine on my computer after >i make thefollowing changes in the configuration files > >modified start_scgi to include -h option >..\..\ruby\bin\ruby.exe script\scgi_rails start >-hmy.ip.add.ress -p 9999 -e production -D >modified hosts to include >my.ip.addr.ess www.myApp.com >modified httpd.conf, (modified cookbook virtualhost) ><VirtualHost *> > ServerName www.myApp.com > # handle all requests through SCGI > SCGIMount / my.ip.add.ress:9999 > DocumentRoot ${path}/rails_apps/myApp/public > <Directory ${path}/rails_apps/myApp/public> > Options +FollowSymLinks > Order allow,deny > allow from all > </Directory> > AddDefaultCharset utf-8 > ErrorDocument 500 /500.html > ErrorDocument 404 /404.html > # matches locations with a dot following at least >one morecharacters, > # that is, things like *.html, *.css, *.js, >which should bedelivered > # directly from the filesystem. Also matches the >following > # subdirectories: images, javascript(s), >stylesheets > ><LocationMatch^/(images|javascript|javascripts|stylesheets|[^/]+\.[^/]+$)> > # don''t handle those with SCGI > SCGIHandler Off > </LocationMatch> > <LocationMatch "^/$"> > # don''t handle just / with SCGI > SCGIHandler Off > </LocationMatch> ></VirtualHost> > >Once i start scgi myApp is up at www.myApp.com >Unfortunately the same is not accessible from a >different computer. >So the question is 1) is this configuration right, and >2) is this theonnly configuration required to make my >app accessible to the othercomputers >many thanx in advance >shodhan >ps: if i try telnet my.ip.add.ress 9999 from another >machine, it turnsout to be sucessfull > > >>_______________________________________________ >>Instantrails-users mailing list >>Instantrails-users at rubyforge.org >> >> >> >http://rubyforge.org/mailman/listinfo/instantrails-users > > > > > > > >__________________________________ >Yahoo! Mail - PC Magazine Editors'' Choice 2005 >http://mail.yahoo.com > > >