# Adding my appname to the URL

**URL:** <https://www.ruby-forum.com/t/adding-my-appname-to-the-url/124281>\
**Category:** Deployment\
**Created:** [December 27, 2007, 9:33am UTC](https://www.ruby-forum.com/t/adding-my-appname-to-the-url/124281 "2007-12-27T09:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shafi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@shafi](https://www.ruby-forum.com/u/shafi)\
**Post date:** [December 27, 2007, 9:33am UTC](https://www.ruby-forum.com/t/adding-my-appname-to-the-url/124281/1 "2007-12-27T09:33:57Z")

</div>

Hi All,  
I need to get my Ruby on Rails application running on:  
[http://IP](http://IP):port/AppName/Controller/Action  
rather than:  
[http://IP](http://IP):port/Controller/Action directly  
That’s because I want to integrate it with facebook.

I’ve tried the following in environment.rb but didn’t work:  
uncommented:  
config.action\_controller.session\_store = :active\_record\_store

and added:  
ActionController::AbstractRequest.relative\_url\_root = “/myappname”

But it didn’t work, can any1 please advise.

---

<div class="post-metadata">

**Author:** ![shafi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@shafi](https://www.ruby-forum.com/u/shafi)\
**Post date:** [January 9, 2008, 10:53pm UTC](https://www.ruby-forum.com/t/adding-my-appname-to-the-url/124281/2 "2008-01-09T22:53:22Z")

</div>

I think you’ll need to either configure this with the web server, and/or  
possibly add the AppName to your routes. I’m really not sure since I’ve  
never done it, but that would be a good place to start.

---

<div class="post-metadata">

**Author:** ![shafi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@shafi](https://www.ruby-forum.com/u/shafi)\
**Post date:** [January 10, 2008, 1:05am UTC](https://www.ruby-forum.com/t/adding-my-appname-to-the-url/124281/3 "2008-01-10T01:05:17Z")

</div>

I would put nginx in front of your rails app and rewrite it. This way  
when  
you need more mongrels you just add more upstream directives.

AEM

On Dec 27, 2007 1:33 AM, Mohamed S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> config.action\_controller.session\_store = :active\_record\_store
> 
> and added:  
> ActionController::AbstractRequest.relative\_url\_root = “/myappname”
> 
> ## But it didn’t work, can any1 please advise.
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Adrian Esteban Madrid  
Lead Developer, Prefab Markets  
[http://www.prefabmarkets.com](http://www.prefabmarkets.com)
