Hi,

Good evening!

Is that possible to point like below

<VirtualHost *:80>
   ServerName *xxx.xxx.xx.x/mysite * #server ip address
   DocumentRoot /path/to/projects/public
   RailsEnv development
   <Directory /path/to/projects/public>
     AllowOverride all
     Options -MultiViews
   </Directory>
</VirtualHost>

and Can I access *xxx.xxx.xx.x/mysite *in my browser? I tries this but its
doesn't work...

// hosts file
xxx.xxx.xx.x xxx.xxx.xx.x/mysite

is this possible or we have to give only name (domain name) ? i.e
example.com/mysite



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2245414e-0771-46c2-93ec-d75c85c96f31%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Walter Lee Davis at Jan 22, 2014 at 3:01 pm

    On Jan 22, 2014, at 6:04 AM, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or on a local network. My answers are somewhat specific to this, particularly the part about your hosts file.
    <VirtualHost *:80>
    ServerName xxx.xxx.xx.x/mysite #server ip address
    ServerName takes a hostname, not an IP address or path. Try mysite.com instead.
    DocumentRoot /path/to/projects/public
    If your Rails app is called "Projects", then this line looks correct.
    RailsEnv development
    <Directory /path/to/projects/public>
    Ditto, this path should match the DocumentRoot line.
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access xxx.xxx.xx.x/mysite in my browser? I tries this but its doesn't work...
    If you had set up the server to respond to mysite.com, and the server was running, then you would point your browser to mysite.com/ and see whatever you had configured your root path to be.
    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite
    In your hosts file, you would put

      xxx.xxx.xxx.xxx mysite.com

    A DNS record like this would point *from* an IP *to* a virtual host. In production, you would set up your public server to respond to your actual domain name, and you would have your DNS hosting provider point your domain to the public IP address of your actual server.

    Walter
    is this possible or we have to give only name (domain name) ? i.e example.com/mysite




    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2245414e-0771-46c2-93ec-d75c85c96f31%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0988EDE1-DB38-4B72-85EB-BF2B871E3DA7%40wdstudio.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Saravanan p at Jan 23, 2014 at 3:37 am

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or on a
    local network. My answers are somewhat specific to this, particularly the
    part about your hosts file.

             No, its not local network. In local network i can setup with any
    domain name in hosts file and i can access the rails app with that domain
    name in my browser.
             Problem is, i have server ip address with global access. But i
    don't have domain name for that server.
             If I mention 121.0.0.1 mysite.com in my server hosts file, i know
    i cant access mysite.com in my local browser.

             I am trying to setup like ServerName server_ip_address/mysite
    instead of ServerName mysite.com/mysite
             I think we can only give mysite.com. mysite.com/mysite will not
    point rails application.
    >


    On Wed, Jan 22, 2014 at 8:31 PM, Walter Lee Davis wrote:

    On Jan 22, 2014, at 6:04 AM, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or on a
    local network. My answers are somewhat specific to this, particularly the
    part about your hosts file.
    <VirtualHost *:80>
    ServerName xxx.xxx.xx.x/mysite #server ip address
    ServerName takes a hostname, not an IP address or path. Try mysite.cominstead.
    DocumentRoot /path/to/projects/public
    If your Rails app is called "Projects", then this line looks correct.
    RailsEnv development
    <Directory /path/to/projects/public>
    Ditto, this path should match the DocumentRoot line.
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access xxx.xxx.xx.x/mysite in my browser? I tries this but its
    doesn't work...

    If you had set up the server to respond to mysite.com, and the server was
    running, then you would point your browser to mysite.com/ and see
    whatever you had configured your root path to be.
    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite
    In your hosts file, you would put

    xxx.xxx.xxx.xxx mysite.com

    A DNS record like this would point *from* an IP *to* a virtual host. In
    production, you would set up your public server to respond to your actual
    domain name, and you would have your DNS hosting provider point your domain
    to the public IP address of your actual server.

    Walter
    is this possible or we have to give only name (domain name) ? i.e
    example.com/mysite



    --
    You received this message because you are subscribed to the Google
    Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/2245414e-0771-46c2-93ec-d75c85c96f31%40googlegroups.com
    .
    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/0988EDE1-DB38-4B72-85EB-BF2B871E3DA7%40wdstudio.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOxyzk0p2fu_1XVk73PiW86HjDq29Q7w7NiGcR68RNcCnBNY0w%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Walter Lee Davis at Jan 23, 2014 at 1:50 pm

    On Jan 22, 2014, at 10:37 PM, saravanan p wrote:

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or on a local network. My answers are somewhat specific to this, particularly the part about your hosts file.
    No, its not local network. In local network i can setup with any domain name in hosts file and i can access the rails app with that domain name in my browser.
    Problem is, i have server ip address with global access. But i don't have domain name for that server.
    If I mention 121.0.0.1 mysite.com in my server hosts file, i know i cant access mysite.com in my local browser.

    I am trying to setup like ServerName server_ip_address/mysite instead of ServerName mysite.com/mysite
    I think we can only give mysite.com. mysite.com/mysite will not point rails application.
    If you have properly pointed Apache to the /public folder inside your Rails app root, then asking for mysite.com/mysite will look first for a file or folder in the /public folder named mysite, and second will look for a route in the routes file that matches that URL. There may be a way to run Rails in a subfolder URL, but I've never used it. You don't seem to be asking that. Please let me know if that isn't clear, or if that is actually what you want.

    Walter


    On Wed, Jan 22, 2014 at 8:31 PM, Walter Lee Davis wrote:
    On Jan 22, 2014, at 6:04 AM, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or on a local network. My answers are somewhat specific to this, particularly the part about your hosts file.
    <VirtualHost *:80>
    ServerName xxx.xxx.xx.x/mysite #server ip address
    ServerName takes a hostname, not an IP address or path. Try mysite.com instead.
    DocumentRoot /path/to/projects/public
    If your Rails app is called "Projects", then this line looks correct.
    RailsEnv development
    <Directory /path/to/projects/public>
    Ditto, this path should match the DocumentRoot line.
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access xxx.xxx.xx.x/mysite in my browser? I tries this but its doesn't work...
    If you had set up the server to respond to mysite.com, and the server was running, then you would point your browser to mysite.com/ and see whatever you had configured your root path to be.
    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite
    In your hosts file, you would put

    xxx.xxx.xxx.xxx mysite.com

    A DNS record like this would point *from* an IP *to* a virtual host. In production, you would set up your public server to respond to your actual domain name, and you would have your DNS hosting provider point your domain to the public IP address of your actual server.

    Walter
    is this possible or we have to give only name (domain name) ? i.e example.com/mysite




    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2245414e-0771-46c2-93ec-d75c85c96f31%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0988EDE1-DB38-4B72-85EB-BF2B871E3DA7%40wdstudio.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOxyzk0p2fu_1XVk73PiW86HjDq29Q7w7NiGcR68RNcCnBNY0w%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/15C96438-C7E1-4B1C-8EC4-834A3E2A05B3%40wdstudio.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Norm Scherer at Jan 23, 2014 at 11:41 pm

    On 01/22/2014 08:37 PM, saravanan p wrote:
    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or
    on a local network. My answers are somewhat specific to this,
    particularly the part about your hosts file.

    No, its not local network. In local network i can setup with
    any domain name in hosts file and i can access the rails app with that
    domain name in my browser.
    Problem is, i have server ip address with global access. But i
    don't have domain name for that server.
    If I mention 121.0.0.1 mysite.com <http://mysite.com> in my
    server hosts file, i know i cant access mysite.com
    <http://mysite.com> in my local browser.
    On your server system and on your client (local) system (all assuming
    you cannot set it up in dns) you need to have the server associated with
    the ip. On the server it is as simple as putting '127.0.0.1 localhost
    mysite' in the /etc/hosts file and on the client (local) system you
    would put '121.0.0.1 mysite' in the /etc/hosts file (this assumes that
    121.0.0.1 is the address of the server). In your virtual host file you
    would list the server name as mysite. You are making this all too complex.

    You do not need to mess with domains etc. if you have the static ip and
    hostname information available.

    Norm
    I am trying to setup like ServerName server_ip_address/mysite
    instead of ServerName mysite.com/mysite <http://mysite.com/mysite>
    I think we can only give mysite.com <http://mysite.com>.
    mysite.com/mysite <http://mysite.com/mysite> will not point rails
    application.


    On Wed, Jan 22, 2014 at 8:31 PM, Walter Lee Davis wrote:

    On Jan 22, 2014, at 6:04 AM, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below
    It sounds like you are setting this up for localhost viewing, or
    on a local network. My answers are somewhat specific to this,
    particularly the part about your hosts file.
    <VirtualHost *:80>
    ServerName xxx.xxx.xx.x/mysite #server ip address
    ServerName takes a hostname, not an IP address or path. Try
    mysite.com <http://mysite.com> instead.
    DocumentRoot /path/to/projects/public
    If your Rails app is called "Projects", then this line looks correct.
    RailsEnv development
    <Directory /path/to/projects/public>
    Ditto, this path should match the DocumentRoot line.
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access xxx.xxx.xx.x/mysite in my browser? I tries this
    but its doesn't work...

    If you had set up the server to respond to mysite.com
    <http://mysite.com>, and the server was running, then you would
    point your browser to mysite.com/ <http://mysite.com/> and see
    whatever you had configured your root path to be.
    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite
    In your hosts file, you would put

    xxx.xxx.xxx.xxx mysite.com <http://mysite.com>

    A DNS record like this would point *from* an IP *to* a virtual
    host. In production, you would set up your public server to
    respond to your actual domain name, and you would have your DNS
    hosting provider point your domain to the public IP address of
    your actual server.

    Walter
    is this possible or we have to give only name (domain name) ?
    i.e example.com/mysite <http://example.com/mysite>



    --
    You received this message because you are subscribed to the
    Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com
    To post to this group, send email to
    rubyonrails-talk@googlegroups.com
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/2245414e-0771-46c2-93ec-d75c85c96f31%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google
    Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to rubyonrails-talk+unsubscribe@googlegroups.com
    To post to this group, send email to
    rubyonrails-talk@googlegroups.com
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/0988EDE1-DB38-4B72-85EB-BF2B871E3DA7%40wdstudio.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    You received this message because you are subscribed to the Google
    Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/CAOxyzk0p2fu_1XVk73PiW86HjDq29Q7w7NiGcR68RNcCnBNY0w%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/52E1A894.6070203%40earthlink.net.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mārtiņš Poļakovs at Jan 24, 2014 at 8:24 am
    Hi,

    If I understand you correctly, you want to deploy your rails app to
    sub-uri. There's a how-to in passenger documentation:
    http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri

    I think you don't have to put ServerName xxx.xxx.xx.xx at all in your
    VirtualHost file, because ServerName is a host name not an ip address:
    http://httpd.apache.org/docs/2.2/mod/core.html#servername

    you should put the passenger config in a default virtualhost for your
    apache installation.

    On Wednesday, January 22, 2014 1:04:50 PM UTC+2, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below

    <VirtualHost *:80>
    ServerName *xxx.xxx.xx.x/mysite * #server ip address
    DocumentRoot /path/to/projects/public
    RailsEnv development
    <Directory /path/to/projects/public>
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access *xxx.xxx.xx.x/mysite *in my browser? I tries this but
    its doesn't work...

    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite

    is this possible or we have to give only name (domain name) ? i.e
    example.com/mysite


    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/acaaea8c-528d-4f45-8952-81414b46e681%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Saravanan p at Jan 27, 2014 at 10:47 am
    If I understand you correctly, you want to deploy your rails app to
    sub-uri. There's a how-to in passenger documentation:
    http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri

    I think you don't have to put ServerName xxx.xxx.xx.xx at all in your
    VirtualHost file, because ServerName is a host name not an ip address:
    http://httpd.apache.org/docs/2.2/mod/core.html#servername

    you should put the passenger config in a default virtualhost for your
    apache installation.

          Hi Martins,

            yes, you understand me correctly :)

            I checked the links which you provide and its very helpful to me and
    i solved my problem.

    Thanks!
    Saravanan P




    On Fri, Jan 24, 2014 at 1:54 PM, Mārtiņš Poļakovs wrote:

    Hi,

    If I understand you correctly, you want to deploy your rails app to
    sub-uri. There's a how-to in passenger documentation:
    http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri

    I think you don't have to put ServerName xxx.xxx.xx.xx at all in your
    VirtualHost file, because ServerName is a host name not an ip address:
    http://httpd.apache.org/docs/2.2/mod/core.html#servername

    you should put the passenger config in a default virtualhost for your
    apache installation.


    On Wednesday, January 22, 2014 1:04:50 PM UTC+2, saravanan p wrote:

    Hi,

    Good evening!

    Is that possible to point like below

    <VirtualHost *:80>
    ServerName *xxx.xxx.xx.x/mysite * #server ip address
    DocumentRoot /path/to/projects/public
    RailsEnv development
    <Directory /path/to/projects/public>
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>

    and Can I access *xxx.xxx.xx.x/mysite *in my browser? I tries this but
    its doesn't work...

    // hosts file
    xxx.xxx.xx.x xxx.xxx.xx.x/mysite

    is this possible or we have to give only name (domain name) ? i.e
    example.com/mysite



    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/acaaea8c-528d-4f45-8952-81414b46e681%40googlegroups.com
    .

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOxyzk27Vx%2BvSAzzbt590ivP0NUzi_ahk324D5-A_TV_ZDVBaQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 22, '14 at 11:05a
activeJan 27, '14 at 10:47a
posts7
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase